Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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
fromsphinx-favicon
tosphinx_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.
Use pip
to install Sphinx Favicon in your environment:
pip install sphinx-favicon
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.
Contributions of any kind are welcome. Please see the contribution section of our documentation for more information.
FAQs
Sphinx Extension adding support for custom favicons
We found that sphinx-favicon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.