Registry / web-framework / sphinx-favicon

sphinx-favicon

JSON →
library1.1.0pypypiunverified

Sphinx Favicon is an active Sphinx extension, currently at version 1.1.0, that enhances the ability to add custom favicons to Sphinx HTML documentation. It allows users to define favicons directly in `conf.py` with various attributes like `rel`, `sizes`, `href`, or `name`, providing more flexibility than Sphinx's default `favicon.ico` support. The library maintains a steady release cadence with recent updates focusing on bug fixes and dependency modernization.

pip install sphinx-favicon
INSTALL
IMPORT
SIG · SPHINX-FAVICON
S
sphinx-favicon
web-frameworkpythonv1.1.0
Install
5.5s avg
Import
Disk
94MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 92.1MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 5.5s · import 0.000s · 93MB
94MB installed
● package 94MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Extension Enablement
extensions = ['sphinx_favicon']
extensions = ['sphinx-favicon']
Between v0.2 and v1.0, the module name of the extension changed from `sphinx-favicon` to `sphinx_favicon` to conform with Python standards. Ensure your `conf.py` is updated.

To quickly integrate `sphinx-favicon` into your Sphinx project, first ensure your favicon images (e.g., `icon.png`, `apple-touch-icon.png`) are placed in your `_static` directory. Then, modify your `conf.py` file to include `sphinx_favicon` in your `extensions` list and configure the `favicons` list with paths to your images. The `html_static_path` must be defined if using relative paths for favicons.

# conf.py # Add the extension to the list of enabled Sphinx extensions extensions = [ 'sphinx.ext.autodoc', 'sphinx_favicon', ] # Configure the directory for static files (where your favicon images will be) html_static_path = ['_static'] # Define your favicons. Ensure 'icon.png' exists in your _static directory. favicons = [ {"href": "icon.png"}, {"rel": "apple-touch-icon", "href": "apple-touch-icon.png"} ]
Debug
Known issues
breakingThe extension module name changed from `sphinx-favicon` to `sphinx_favicon` in version 1.0. Older configurations using `sphinx-favicon` in the `extensions` list will break.
fix
Update your `conf.py` file: change `extensions = ['sphinx-favicon']` to `extensions = ['sphinx_favicon']`.
affects: < 1.0
gotchaWhen using relative paths for your favicon images (e.g., `"href": "icon.png"`), the `html_static_path` variable MUST be defined in `conf.py` and point to the directory containing your static files. If omitted, Sphinx may not locate your favicons.
fix
Ensure `html_static_path = ['_static']` (or your chosen static directory) is set in your `conf.py` file, and your favicon images are within that directory.
affects: >= 1.0
gotchaSphinx has a built-in `html_favicon` configuration option for a single ICO, PNG, SVG, or GIF favicon. While `sphinx-favicon` enhances this, using both `html_favicon` and `favicons` simultaneously can lead to unexpected behavior or redundant output. Prioritize `sphinx-favicon`'s `favicons` for comprehensive control.
fix
If using `sphinx-favicon`, rely on the `favicons` list for all your favicon definitions for best results. Avoid setting `html_favicon` in `conf.py` if `favicons` provides the desired functionality.
affects: All
Upgrade
Version history
1.1.0latest on PyPI · released Feb 12, 2026
Audit
Dependencies
PythonrequiredRequired runtime environment.
SphinxrequiredCore dependency as it is a Sphinx extension.
Agent activity
12 hits · last 30 days
node
10
Resources
sphinx-favicon — pip install sphinx-favicon · libregistry