Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sphinx-favicon

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sphinx-favicon

Sphinx Extension adding support for custom favicons

  • 1.0.1
  • PyPI
  • Socket score

Maintainers
1

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.0

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc