Skip to content

Commit 42313f6

Browse files
authored
Add favicon and configuration (#4)
1 parent 89cd074 commit 42313f6

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed
35.3 KB
Loading
3.9 KB
Loading
Lines changed: 28 additions & 0 deletions
Loading

docs/conf.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
# "sphinx_comments",
6262
"sphinx_panels",
6363
"sphinx.ext.viewcode",
64+
"sphinx-favicon",
6465
"sphinx_gallery.gen_gallery",
6566
"sphinx_tags",
6667
]
@@ -109,6 +110,28 @@
109110
html_sourcelink_suffix = ''
110111
html_title = 'napari'
111112

113+
favicons = [
114+
{
115+
# the SVG is the "best" and contains code to detect OS light/dark mode
116+
"static-file": "favicon/logo-silhouette-dark-light.svg",
117+
"type": "image/svg+xml",
118+
},
119+
{
120+
# Safari in Oct. 2022 does not support SVG
121+
# an ICO would work as well, but PNG should be just as good
122+
# setting sizes="any" is needed for Chrome to prefer the SVG
123+
"sizes": "any",
124+
"static-file": "favicon/logo-silhouette-192.png",
125+
},
126+
{
127+
# this is used on iPad/iPhone for "Save to Home Screen"
128+
# apparently some other apps use it as well
129+
"rel": "apple-touch-icon",
130+
"sizes": "180x180",
131+
"static-file": "favicon/logo-noborder-180.png",
132+
},
133+
]
134+
112135
html_css_files = [
113136
'custom.css',
114137
]

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ sphinx-tabs
33
sphinx-tags
44
sphinx-panels
55
sphinx-external-toc
6+
sphinx-favicon
67
sphinx-gallery
78
sphinx_autodoc_typehints==1.12.0
89
myst-nb

0 commit comments

Comments
 (0)