Name | sphinx-favicon JSON |
Version |
1.0.1
JSON |
| download |
home_page | |
Summary | Sphinx Extension adding support for custom favicons |
upload_time | 2023-03-02 23:28:47 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | MIT |
keywords |
sphinx
extension
favicon
meta html
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Sphinx Favicon
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Black badge](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI](https://img.shields.io/pypi/v/sphinx-favicon?logo=python&logoColor=white)](https://pypi.org/project/sphinx-favicon/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-favicon?color=orange&logo=python&logoColor=white)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/tcmetzger/sphinx-favicon/basic-ci.yml?logo=github&logoColor=white)
![Read the Docs (version)](https://img.shields.io/readthedocs/sphinx-favicon/latest?logo=readthedocs&logoColor=white)
> **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"`](https://html.spec.whatwg.org/multipage/links.html#rel-icon)
or [`"apple-touch-icon"`](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html) and
any favicon size.
The Sphinx Favicon extension gives you more flexibility than the [standard
`favicon.ico` supported by Sphinx](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_favicon). 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:
```sh
pip install sphinx-favicon
```
## Usage
After installing **sphinx-favicon**, add it to your `conf.py` extension list:
```python
extensions = ["sphinx_favicon"]
```
Then configure the favicon links using the `favicons` parameter (`html_static_path` is mandatory if you use relative path):
```python
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:
```html
<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](https://sphinx-favicon.readthedocs.io).
## Contribution
Contributions of any kind are welcome. Please see the
[contribution](https://sphinx-favicon.readthedocs.io/en/latest/contribute.html) section of
our documentation for more information.
Raw data
{
"_id": null,
"home_page": "",
"name": "sphinx-favicon",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "sphinx,extension,favicon,meta html",
"author": "",
"author_email": "Timo Cornelius Metzger <coding@tcmetzger.net>",
"download_url": "https://files.pythonhosted.org/packages/b1/25/3c78b785c3ea991597c310ac6bdc7949c2a7549e031dbb22db4ce8d1b99b/sphinx-favicon-1.0.1.tar.gz",
"platform": null,
"description": "# Sphinx Favicon\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Black badge](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![PyPI](https://img.shields.io/pypi/v/sphinx-favicon?logo=python&logoColor=white)](https://pypi.org/project/sphinx-favicon/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-favicon?color=orange&logo=python&logoColor=white)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/tcmetzger/sphinx-favicon/basic-ci.yml?logo=github&logoColor=white)\n![Read the Docs (version)](https://img.shields.io/readthedocs/sphinx-favicon/latest?logo=readthedocs&logoColor=white)\n\n> **Note: Updating from Version 0.2 to Version 1.0**\n>\n> 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`!\n\n**A Sphinx extension to add custom favicons**\n\nWith Sphinx Favicon, you can add custom favicons to your Sphinx html\ndocumentation quickly and easily.\n\nYou can define favicons directly in your `conf.py`, with different `rel`\nattributes such as [`\"icon\"`](https://html.spec.whatwg.org/multipage/links.html#rel-icon)\nor [`\"apple-touch-icon\"`](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html) and\nany favicon size.\n\nThe Sphinx Favicon extension gives you more flexibility than the [standard\n`favicon.ico` supported by Sphinx](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_favicon). It provides a quick and easy way to add the most\nimportant favicon formats for different browsers and devices.\n\n## Installation\n\nUse ``pip`` to install Sphinx Favicon in your environment:\n\n```sh\npip install sphinx-favicon\n```\n\n## Usage\n\nAfter installing **sphinx-favicon**, add it to your `conf.py` extension list:\n\n```python\nextensions = [\"sphinx_favicon\"]\n```\n\nThen configure the favicon links using the `favicons` parameter (`html_static_path` is mandatory if you use relative path):\n\n```python\nhtml_static_path = [\"_static\"]\n\nfavicons = [\n {\"href\": \"icon.svg\"}, # => use `_static/icon.svg`\n {\"href\": \"https://secure.example.com/favicon/favicon-16x16.png\"},\n {\"href\": \"https://secure.example.com/favicon/favicon-32x32.png\"},\n {\n \"rel\": \"apple-touch-icon\",\n \"href\": \"https://secure.example.com/favicon/apple-touch-icon-180x180.png\",\n },\n]\n```\n\nBased on this configuration, Sphinx will include the following favicon information in the HTML `<head>` element:\n\n```html\n<link rel=\"icon\" href=\"_static/icon.svg\" type=\"image/svg+xml\">\n<link rel=\"icon\" href=\"https://secure.example.com/favicon/favicon-16x16.png\" sizes=\"16x16\" type=\"image/png\">\n<link rel=\"icon\" href=\"https://secure.example.com/favicon/favicon-32x32.png\" sizes=\"32x32\" type=\"image/png\">\n<link rel=\"apple-touch-icon\" href=\"https://secure.example.com/favicon/apple-touch-icon-180x180.png\" sizes=\"180x180\" type=\"image/png\">\n```\n\nFor more details and more advanced usage, please see the\n[documentation](https://sphinx-favicon.readthedocs.io).\n\n## Contribution\n\nContributions of any kind are welcome. Please see the\n[contribution](https://sphinx-favicon.readthedocs.io/en/latest/contribute.html) section of\nour documentation for more information.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Sphinx Extension adding support for custom favicons",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/tcmetzger/sphinx-favicon"
},
"split_keywords": [
"sphinx",
"extension",
"favicon",
"meta html"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "92c2152bd6c211b847e525d2c7004fd98e3ac5baeace192716da8cd9c9ec2427",
"md5": "6f6833080660405d65ba390b687e4cf6",
"sha256": "7c93d6b634cb4c9687ceab67a8526f05d3b02679df94e273e51a43282e6b034c"
},
"downloads": -1,
"filename": "sphinx_favicon-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6f6833080660405d65ba390b687e4cf6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6997,
"upload_time": "2023-03-02T23:28:45",
"upload_time_iso_8601": "2023-03-02T23:28:45.985152Z",
"url": "https://files.pythonhosted.org/packages/92/c2/152bd6c211b847e525d2c7004fd98e3ac5baeace192716da8cd9c9ec2427/sphinx_favicon-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b1253c78b785c3ea991597c310ac6bdc7949c2a7549e031dbb22db4ce8d1b99b",
"md5": "211b14a52b5a6dfeaa1669af2825c27d",
"sha256": "df796de32125609c1b4a8964db74270ebf4502089c27cd53f542354dc0b57e8e"
},
"downloads": -1,
"filename": "sphinx-favicon-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "211b14a52b5a6dfeaa1669af2825c27d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8162,
"upload_time": "2023-03-02T23:28:47",
"upload_time_iso_8601": "2023-03-02T23:28:47.635498Z",
"url": "https://files.pythonhosted.org/packages/b1/25/3c78b785c3ea991597c310ac6bdc7949c2a7549e031dbb22db4ce8d1b99b/sphinx-favicon-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-02 23:28:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tcmetzger",
"github_project": "sphinx-favicon",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sphinx-favicon"
}