|
1 | 1 | # -- Path setup -------------------------------------------------------------- |
2 | 2 | import os |
3 | 3 | import sys |
| 4 | +import pydata_sphinx_theme |
4 | 5 |
|
5 | 6 | sys.path.append("scripts") |
6 | 7 | from gallery_directive import GalleryDirective |
|
11 | 12 | copyright = "2019, PyData Community" |
12 | 13 | author = "PyData Community" |
13 | 14 |
|
14 | | -import pydata_sphinx_theme |
15 | | - |
16 | | - |
17 | 15 | # -- General configuration --------------------------------------------------- |
18 | 16 |
|
19 | 17 | extensions = [ |
|
33 | 31 | # "nbsphinx", # Uncomment and comment-out MyST-NB for local testing purposes. |
34 | 32 | "numpydoc", |
35 | 33 | "sphinx_togglebutton", |
| 34 | + "sphinx_favicon", |
36 | 35 | ] |
37 | 36 |
|
38 | | -# -- Internationalization ------------------------------------------------ |
39 | | -# specifying the natural language populates some key tags |
40 | | -language = "en" |
| 37 | +# Add any paths that contain templates here, relative to this directory. |
| 38 | +templates_path = ["_templates"] |
| 39 | + |
| 40 | +# List of patterns, relative to source directory, that match files and |
| 41 | +# directories to ignore when looking for source files. |
| 42 | +# This pattern also affects html_static_path and html_extra_path. |
| 43 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"] |
| 44 | + |
| 45 | +# -- Sitemap ----------------------------------------------------------------- |
41 | 46 |
|
42 | 47 | # ReadTheDocs has its own way of generating sitemaps, etc. |
43 | 48 | if not os.environ.get("READTHEDOCS"): |
44 | 49 | extensions += ["sphinx_sitemap"] |
45 | 50 |
|
46 | | - # -- Sitemap ------------------------------------------------------------- |
47 | 51 | html_baseurl = os.environ.get("SITEMAP_URL_BASE", "http://127.0.0.1:8000/") |
48 | 52 | sitemap_locales = [None] |
49 | 53 | sitemap_url_scheme = "{link}" |
50 | 54 |
|
| 55 | + |
| 56 | +# -- autosummary ------------------------------------------------------------- |
| 57 | + |
51 | 58 | autosummary_generate = True |
52 | 59 |
|
53 | | -# Add any paths that contain templates here, relative to this directory. |
54 | | -templates_path = ["_templates"] |
55 | 60 |
|
56 | | -# List of patterns, relative to source directory, that match files and |
57 | | -# directories to ignore when looking for source files. |
58 | | -# This pattern also affects html_static_path and html_extra_path. |
59 | | -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"] |
| 61 | +# -- Internationalization ---------------------------------------------------- |
60 | 62 |
|
61 | | -# -- Extension options ------------------------------------------------------- |
| 63 | +# specifying the natural language populates some key tags |
| 64 | +language = "en" |
| 65 | + |
| 66 | +# -- MyST options ------------------------------------------------------------ |
62 | 67 |
|
63 | 68 | # This allows us to use ::: to denote directives, useful for admonitions |
64 | 69 | myst_enable_extensions = ["colon_fence", "linkify", "substitution"] |
| 70 | +myst_heading_anchors = 2 |
| 71 | +myst_substitutions = {"rtd": "[Read the Docs](https://readthedocs.org/)"} |
| 72 | + |
| 73 | +# -- Ablog options ----------------------------------------------------------- |
| 74 | + |
| 75 | +blog_path = "examples/blog/index" |
| 76 | +blog_authors = { |
| 77 | + "pydata": ("PyData", "https://pydata.org"), |
| 78 | + "jupyter": ("Jupyter", "https://jupyter.org"), |
| 79 | +} |
65 | 80 |
|
66 | 81 | # -- Options for HTML output ------------------------------------------------- |
67 | 82 |
|
68 | | -# The theme to use for HTML and HTML Help pages. See the documentation for |
69 | | -# a list of builtin themes. |
70 | | -# |
71 | 83 | html_theme = "pydata_sphinx_theme" |
72 | 84 | html_logo = "_static/logo.svg" |
73 | 85 | html_favicon = "_static/logo.svg" |
|
168 | 180 | ], |
169 | 181 | } |
170 | 182 |
|
171 | | -myst_heading_anchors = 2 |
172 | | -myst_substitutions = {"rtd": "[Read the Docs](https://readthedocs.org/)"} |
173 | | - |
174 | 183 | html_context = { |
175 | 184 | "github_user": "pydata", |
176 | 185 | "github_repo": "pydata-sphinx-theme", |
|
182 | 191 | "contributing.rst": "community/index.rst", |
183 | 192 | } |
184 | 193 |
|
185 | | -# ABlog configuration |
186 | | -blog_path = "examples/blog/index" |
187 | | -blog_authors = { |
188 | | - "pydata": ("PyData", "https://pydata.org"), |
189 | | - "jupyter": ("Jupyter", "https://jupyter.org"), |
190 | | -} |
191 | | - |
192 | | - |
193 | 194 | # Add any paths that contain custom static files (such as style sheets) here, |
194 | 195 | # relative to this directory. They are copied after the builtin static files, |
195 | 196 | # so a file named "default.css" will overwrite the builtin "default.css". |
196 | 197 | html_static_path = ["_static"] |
197 | 198 | html_css_files = ["custom.css"] |
198 | 199 | todo_include_todos = True |
199 | 200 |
|
| 201 | +# -- favicon options --------------------------------------------------------- |
| 202 | + |
| 203 | +# see https://sphinx-favicon.readthedocs.io for more information about the |
| 204 | +# sphinx-favicon extention |
| 205 | +favicons = [ |
| 206 | + # generic icons compatible with most browsers |
| 207 | + "favicon-32x32.png", |
| 208 | + "favicon-16x16.png", |
| 209 | + {"rel": "shortcut icon", "sizes": "any", "href": "favicon.ico"}, |
| 210 | + # chrome specific |
| 211 | + "android-chrome-192x192.png", |
| 212 | + # apple icons |
| 213 | + {"rel": "mask-icon", "color": "#459db9", "href": "safari-pinned-tab.svg"}, |
| 214 | + {"rel": "apple-touch-icon", "href": "apple-touch-icon.png"}, |
| 215 | + # msapplications |
| 216 | + {"name": "msapplication-TileColor", "content": "#459db9"}, |
| 217 | + {"name": "theme-color", "content": "#ffffff"}, |
| 218 | + {"name": "msapplication-TileImage", "content": "mstile-150x150.png"}, |
| 219 | +] |
| 220 | + |
| 221 | +# -- application setup ------------------------------------------------------- |
| 222 | + |
200 | 223 |
|
201 | 224 | def setup(app): |
202 | | - # Add the gallery directive |
203 | 225 | app.add_directive("gallery-grid", GalleryDirective) |
0 commit comments