Skip to main content

Sphinx Favicon

License: MIT Black badge PyPI PyPI - Python Version GitHub Workflow Status Read the Docs (version)

Note: Updating from Version 0.2 to Version 1.x and beyond

Between v0.2 and v1.0, the module name of the extension changed to better conform with Python standards. Please update the name used in the extension list of your conf.py from sphinx-favicon to sphinx_favicon!

A Sphinx extension to add custom favicons

With Sphinx Favicon, you can add custom favicons to your Sphinx html documentation quickly and easily.

You can define favicons directly in your conf.py, with different rel attributes such as "icon" or "apple-touch-icon" and any favicon size.

The Sphinx Favicon extension gives you more flexibility than the standard favicon.ico supported by Sphinx. It provides a quick and easy way to add the most important favicon formats for different browsers and devices.

Installation

Use pip to install Sphinx Favicon in your environment:

pip install sphinx-favicon

Usage

After installing sphinx-favicon, add it to your conf.py extension list:

extensions = ["sphinx_favicon"]

Then configure the favicon links using the favicons parameter (html_static_path is mandatory if you use relative path):

html_static_path = ["_static"]

favicons = [
    {"href": "icon.svg"},  # => use `_static/icon.svg`
    {"href": "https://secure.example.com/favicon/favicon-16x16.png"},
    {"href": "https://secure.example.com/favicon/favicon-32x32.png"},
    {
        "rel": "apple-touch-icon",
        "href": "https://secure.example.com/favicon/apple-touch-icon-180x180.png",
    },
]

Based on this configuration, Sphinx will include the following favicon information in the HTML <head> element:

<link rel="icon" href="_static/icon.svg" type="image/svg+xml">
<link rel="icon" href="https://secure.example.com/favicon/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="icon" href="https://secure.example.com/favicon/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="apple-touch-icon" href="https://secure.example.com/favicon/apple-touch-icon-180x180.png" sizes="180x180" type="image/png">

For more details and more advanced usage, please see the documentation.

Contribution

Contributions of any kind are welcome. Please see the contribution section of our documentation for more information.

Metadata

Release files for sphinx-favicon 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-favicon 1.1.0
File Size Uploaded Provenance
sphinx_favicon-1.1.0.tar.gz 8.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-favicon 1.1.0
File Interpreter ABI Platform
sphinx_favicon-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.0 kB

Release files / sphinx_favicon-1.1.0.tar.gz

Download URL sphinx_favicon-1.1.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6f65939fc2a6ac4259c88b09169f0b72681cd4c03dd1d0cf91c57a1fa314e50b
BLAKE2b-256 checksum
How to use checksums
2c26e7ca2321e6286d6ed6a2e824a0ee35ae660ec9a45a4719e33a627ce9e4d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / sphinx_favicon-1.1.0-py3-none-any.whl

Download URL sphinx_favicon-1.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ca71506fbb4d9a30bddc60a29e3fb8854f3e237ad95abad5a5c15f857d987b2
BLAKE2b-256 checksum
How to use checksums
c899c85bc52d785557abddc4d8fdacfbcbda56fb3e715f76b9675fb9c2018aa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Security for sphinx-favicon 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page