Skip to content

Commit e054da1

Browse files
12rambaugresavagetgresavagedrammockgabalafou
authored
update feature focus (#1569)
* docs: add instructions for custom SVG icons (#1490) * docs: add instructions for custom SVG icons * docs: minor tweaks in SVG icon instructions * docs: some more tweaks to SVG icon instructions * Update docs/user_guide/header-links.rst Co-authored-by: Rambaud Pierrick <[email protected]> * Change literalinclude to code-block in header links * Update docs/user_guide/header-links.rst Co-authored-by: Daniel McCloy <[email protected]> * Update docs/user_guide/header-links.rst * Update docs/user_guide/header-links.rst * Update docs/user_guide/header-links.rst * Update docs/user_guide/header-links.rst * Update docs/user_guide/header-links.rst --------- Co-authored-by: tgresavage <[email protected]> Co-authored-by: Rambaud Pierrick <[email protected]> Co-authored-by: Daniel McCloy <[email protected]> * fix: make table background transparent (#1546) * fix: make table background transparent * fix: make table background transparent * fix: add color-theme option to html tag (#1536) * Silence warnings (#1542) * avoid webpack warning during asset compile * avoid frozen modules warning during import * try to make jupyterlite quieter * add config option to silence warnings * fix tests * add docs * hide conditional warning logic in utils * bump: 0.14.2 → 0.14.3 * chore: back to dev * docs: add the list of component using a directive (#1476) * fix: create the component list automatically * fix: read the first comment as documentation * docs: add disclaimer on .html suffix * docs: document every component with a simple one liner * fix: use regex to identify comments * update component branch (#15) * Change default logo alt text (#1472) * Default logo alt text only if no extra text * change default logo * use docstitle as default logo alt text * update docs to reflect change * Apply suggestions from code review Co-authored-by: Daniel McCloy <[email protected]> * use string formatting operator * Update docs/user_guide/branding.rst * docs fixes * Update docs/user_guide/branding.rst * add test * Update pyproject.toml * revert to original --------- Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: Rambaud Pierrick <[email protected]> * chore(i18n) catalan (#1488) i18n: Translate sphinx.po in ca 100% translated source file: 'sphinx.po' on 'ca'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * Build(deps): Bump postcss and css-loader (#1494) Bumps [postcss](https://github.com/postcss/postcss) to 8.4.31 and updates ancestor dependency [css-loader](https://github.com/webpack-contrib/css-loader). These dependencies need to be updated together. Updates `postcss` from 8.4.21 to 8.4.31 - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](postcss/postcss@8.4.21...8.4.31) Updates `css-loader` from 3.6.0 to 6.8.1 - [Release notes](https://github.com/webpack-contrib/css-loader/releases) - [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/css-loader@v3.6.0...v6.8.1) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect - dependency-name: css-loader dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Revert "Build(deps): Bump postcss and css-loader" (#1509) Revert "Build(deps): Bump postcss and css-loader (#1494)" This reverts commit 185a37a. * Update pst docs buttons (#1502) * call them button-links * copy edit * docs: link back to GitHub from PyPI metadata (#1504) This will add a "Source" link in the PyPI page. * navigation_with_keys = False (#1503) * navigation_with_keys = False * None -> False * Apply suggestions from code review --------- Co-authored-by: Daniel McCloy <[email protected]> * fix: convert "stable" to actual version number (#1512) * convert "stable" to actual version number * fix tests re: navigation_with_keys * try bumping autoapi * refactor: use nbsphinx as the default execution lib (#1482) * refactor: use nbsphinx as the default execution lib * add nbstripout to the pre-commits' * add pandoc to the readthedocs deps * refactor: clean the notebook * move the example to the correct folder * fix: solve link issue * install pandoc in the test environment * fix: display of large table in executed cells * avoid Userwarnings from matplotlib * hide the matplotlib wrning management cell * Update readthedocs.yml * build: use pandoc_binary to install pandoc * docs: add reference to pandoc in the setup * update docs * remove pypandoc_binary * Update pyproject.toml Co-authored-by: gabalafou <[email protected]> * ci: use back setup-pandoc * Trigger CI build --------- Co-authored-by: Gabriel Fouasnon <[email protected]> * BUG - Clear alt_text in conf.py (#1471) * comment out alt_text in conf.py * set alt_text to empty string * remove alt_text from conf.py * fix: use 12rambau fork until it's merged with nikeee repo (#1517) * deps: drop support for Sphinx 5 (#1516) * remove ref to myst-nb * update minimal supported version of sphinx * Fix: (webpack.config.js) css-loader API change (#1508) * Fix: (webpack.config.js) css-loader API change The build was broken in <https://github.com/pydata/pydata-sphinx-theme/commit/185a37aa36820f77bffa4c87a772092e9e7cc380>/<https://github.com/pydata/pydata-sphinx-theme/pull/1494>. This change fixes the build, and it seems to be in accordance with the current API as described at <https://github.com/webpack-contrib/css-loader/blob/c6f36cf91ac61743a70e81cfb077faa0f8730ebe/README.md#boolean>. Closes <#1507>. * dedup * restore version bump --------- Co-authored-by: Daniel McCloy <[email protected]> * Fix duplicate HTML IDs (#1425) * Fix duplicate HTML IDs * fix tests * Do not animate the version admonitions colors. (#1424) Otherwise a delay has to be added to the accessibility color contrast checks, to wait for the colors to fully transition. * BUG - Remove redundant ARIA in breadcrumb navigation (#1426) * style(i18n): French Typo fixed (#1430) * Add the ability to add a center section to the footer (#1432) * Add a center section for the footer * Add docs for footer_center * Add a test site for the center footer * test it in our own docs * remove new test site * add footer test --------- Co-authored-by: Daniel McCloy <[email protected]> * Build(deps): Bump actions/checkout from 3 to 4 (#1433) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add dropdown_text argument to generate_header_nav_html (#1423) * Add dropdown_text argument to generate_header_nav_html * Add a test, fix typo in theme.conf and remove header_dropdown_text from docs/conf.py * fixed? --------- Co-authored-by: Daniel McCloy <[email protected]> * fix: rollback ref and Id changes (#1438) * bump: version 0.13.3 → 0.14.0 (#1440) * bump version * update version switcher * back to dev * fix: change the z-index of the dropdown (#1442) In order to be on top of the primary sidebar on small screens. * fix: set the same background for dark/light (#1443) * fix: set the same background for dark/light et the same background color for all state of the search field. It is currently only applied when hovered * fix: wrong css selector * Update src/pydata_sphinx_theme/assets/styles/components/_search.scss * Update src/pydata_sphinx_theme/assets/styles/components/_search.scss * Fix duplicate HTML IDs * fix tests * unique_html_id * backwards-compat generate_header_nav_html * feedback review * update fixture * ughhhh...caching * code cleanup * fix test snapshot * put comment inside def --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Denis Bitouzé <[email protected]> Co-authored-by: Stuart Mumford <[email protected]> Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Rambaud Pierrick <[email protected]> * chore: build the devcontainer automatically in codespace (#1483) * chore: build the devcontainer automaticallyin codespace * refactor: lint * add pandoc to the environment * Fix font color in search input box (#1524) * Fix color * Use --pst-color-text-base * docs: add DecentralChain (#1528) Co-authored-by: jourlez <[email protected]> * Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po in ru [Manual Sync] (#1527) i18n: Translate sphinx.po in ru [Manual Sync] 96% of minimum 20% translated source file: 'sphinx.po' on 'ru'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * ignore transient errors in windows build CI (#1520) * use warning list * clean up notebook * refactor to pass on all platforms? * simplify * fix logic * iterate backwards * fix plaform detection? also don't log unnecessarily�[H * ignore empty string warnings * remove notebook metawarning * Revert "remove notebook metawarning" This reverts commit 42f4672. * try again * debug the mysterious empty warning * escape color codes * import * triage by intermittency, not by platform; better var names * simplify * fix list.remove * undo what I broke * Update tests/utils/check_warnings.py * refactor: remove extention on component set-up (#1529) * use event.key for search shortcut (#1525) * use event.key for search shortcut * suggestions from review * caps lock --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: gabalafou <[email protected]> Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ned Batchelder <[email protected]> Co-authored-by: Adam Porter <[email protected]> Co-authored-by: Denis Bitouzé <[email protected]> Co-authored-by: Stuart Mumford <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Harutaka Kawamura <[email protected]> Co-authored-by: jourlez <[email protected]> * fix: use a directive instead of raw html * fix: make links externals * fix: set reference in paragraphs * fix: missing parameter * fix: use the stem for the component name * refactor: remove never used variables * standardize component descriptions --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: gabalafou <[email protected]> Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ned Batchelder <[email protected]> Co-authored-by: Adam Porter <[email protected]> Co-authored-by: Denis Bitouzé <[email protected]> Co-authored-by: Stuart Mumford <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Harutaka Kawamura <[email protected]> Co-authored-by: jourlez <[email protected]> * fix: primer link in docs (#1556) * docs: add data-content (#1559) Reproduce the change made in Sphinx 7 sphinx-doc/sphinx@8e730ae#diff-a5066e933cbf65adc46e0d1ab9a0b44e0a53ca64cc95dca7e6aa902aed6bd468R105 * Obviate background-from-color-variable (#1558) * Obviate background-from-color-variable * backwards compatibility --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: gresavage <[email protected]> Co-authored-by: tgresavage <[email protected]> Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: gabalafou <[email protected]> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ned Batchelder <[email protected]> Co-authored-by: Adam Porter <[email protected]> Co-authored-by: Denis Bitouzé <[email protected]> Co-authored-by: Stuart Mumford <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Harutaka Kawamura <[email protected]> Co-authored-by: jourlez <[email protected]> Co-authored-by: Chris Holdgraf <[email protected]>
1 parent 9803c5e commit e054da1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+451
-1946
lines changed
+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
"""A directive to generate the list of all the built-in components.
2+
3+
Read the content of the component folder and generate a list of all the components.
4+
This list will display some informations about the component and a link to the
5+
GitHub file.
6+
"""
7+
import re
8+
from pathlib import Path
9+
from typing import Any, Dict, List
10+
11+
from docutils import nodes
12+
from sphinx.application import Sphinx
13+
from sphinx.util import logging
14+
from sphinx.util.docutils import SphinxDirective
15+
16+
logger = logging.getLogger(__name__)
17+
18+
19+
class ComponentListDirective(SphinxDirective):
20+
"""A directive to generate the list of all the built-in components.
21+
22+
Read the content of the component folder and generate a list of all the components.
23+
This list will display some informations about the component and a link to the
24+
GitHub file.
25+
"""
26+
27+
name = "component-list"
28+
has_content = True
29+
required_arguments = 0
30+
optional_arguments = 0
31+
final_argument_whitespace = True
32+
33+
def run(self) -> List[nodes.Node]:
34+
"""Create the list."""
35+
# get the list of all th jinja templates
36+
# not that to remain compatible with sphinx they are labeled as html files
37+
root = Path(__file__).parents[2]
38+
component_dir = (
39+
root
40+
/ "src"
41+
/ "pydata_sphinx_theme"
42+
/ "theme"
43+
/ "pydata_sphinx_theme"
44+
/ "components"
45+
)
46+
if not component_dir.is_dir():
47+
raise FileNotFoundError(
48+
f"Could not find component folder at {component_dir}."
49+
)
50+
components = sorted(component_dir.glob("*.html"))
51+
52+
# create the list of all the components description using bs4
53+
# at the moment we use dummy information
54+
docs = []
55+
pattern = re.compile(r"(?<={#).*?(?=#})", flags=re.DOTALL)
56+
for c in components:
57+
comment = pattern.findall(c.read_text())
58+
docs.append(comment[0].strip() if comment else "No description available.")
59+
60+
# get the urls from the github repo latest branch
61+
github_url = "https://github.com/pydata/pydata-sphinx-theme/blob/main"
62+
urls = [
63+
f"{github_url}/{component.relative_to(root)}" for component in components
64+
]
65+
66+
# build the list of all the components
67+
items = []
68+
for component, url, doc in zip(components, urls, docs):
69+
items.append(
70+
nodes.list_item(
71+
"",
72+
nodes.paragraph(
73+
"",
74+
"",
75+
nodes.reference("", component.stem, internal=False, refuri=url),
76+
nodes.Text(f": {doc}"),
77+
),
78+
)
79+
)
80+
81+
return [nodes.bullet_list("", *items)]
82+
83+
84+
def setup(app: Sphinx) -> Dict[str, Any]:
85+
"""Add custom configuration to sphinx app.
86+
87+
Args:
88+
app: the Sphinx application
89+
90+
Returns:
91+
the 2 parallel parameters set to ``True``.
92+
"""
93+
app.add_directive("component-list", ComponentListDirective)
94+
95+
return {
96+
"parallel_read_safe": True,
97+
"parallel_write_safe": True,
98+
}

docs/_extension/gallery_directive.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def run(self) -> List[nodes.Node]:
7575
path_doc = Path(path_doc).parent
7676
path_data = (path_doc / path_data_rel).resolve()
7777
if not path_data.exists():
78-
logger.warn(f"Could not find grid data at {path_data}.")
78+
logger.info(f"Could not find grid data at {path_data}.")
7979
nodes.text("No grid data found at {path_data}.")
8080
return
8181
yaml_string = path_data.read_text()
@@ -86,7 +86,6 @@ def run(self) -> List[nodes.Node]:
8686
# and generate a card item for each of them
8787
grid_items = []
8888
for item in safe_load(yaml_string):
89-
9089
# remove parameters that are not needed for the card options
9190
title = item.pop("title", "")
9291

docs/_static/custom.css

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
div.admonition.admonition-olive {
88
border-color: hsl(60, 100%, 25%);
99
}
10-
div.admonition.admonition-olive > .admonition-title:before {
10+
div.admonition.admonition-olive > .admonition-title {
1111
background-color: hsl(60, 100%, 14%);
12+
color: white;
1213
}
1314
div.admonition.admonition-olive > .admonition-title:after {
1415
color: hsl(60, 100%, 25%);
1516
}
16-
div.admonition.admonition-olive > .admonition-title {
17-
color: white;
18-
}
1917
/* end-custom-color */
2018

2119
/* begin-custom-icon/* <your static path>/custom.css */
@@ -30,16 +28,14 @@ div.admonition.admonition-icon > .admonition-title:after {
3028
div.admonition.admonition-youtube {
3129
border-color: hsl(0, 100%, 50%); /* YouTube red */
3230
}
33-
div.admonition.admonition-youtube > .admonition-title:before {
31+
div.admonition.admonition-youtube > .admonition-title {
3432
background-color: hsl(0, 99%, 18%);
33+
color: white;
3534
}
3635
div.admonition.admonition-youtube > .admonition-title:after {
3736
color: hsl(0, 100%, 50%);
3837
content: "\f26c"; /* fa-solid fa-tv */
3938
}
40-
div.admonition.admonition-youtube > .admonition-title {
41-
color: white;
42-
}
4339
/* end-custom-youtube */
4440

4541
/* fix for project names that are parsed as links: the whole card is a link so

docs/_static/switcher.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"url": "https://pydata-sphinx-theme.readthedocs.io/en/latest/"
55
},
66
{
7-
"name": "0.14.2 (stable)",
8-
"version": "v0.14.2",
7+
"name": "0.14.3 (stable)",
8+
"version": "v0.14.3",
99
"url": "https://pydata-sphinx-theme.readthedocs.io/en/stable/",
1010
"preferred": true
1111
},

docs/conf.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
"sphinx_design",
3535
"sphinx_copybutton",
3636
"autoapi.extension",
37+
# custom extentions
38+
"_extension.gallery_directive",
39+
"_extension.component_directive",
3740
# For extension examples and demos
3841
"myst_parser",
3942
"ablog",
@@ -44,10 +47,10 @@
4447
"sphinx_togglebutton",
4548
"jupyterlite_sphinx",
4649
"sphinx_favicon",
47-
# custom extentions
48-
"_extension.gallery_directive",
4950
]
5051

52+
jupyterlite_config = "jupyterlite_config.json"
53+
5154
# Add any paths that contain templates here, relative to this directory.
5255
templates_path = ["_templates"]
5356

docs/jupyterlite_config.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"LiteBuildConfig": {
3+
"Application": {
4+
"log_level": 40
5+
}
6+
}
7+
}

docs/user_guide/header-links.rst

+70
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@ Image icons
145145

146146
If you'd like to display an icon image that is not in the FontAwesome icons library,
147147
you may instead specify a URL or a path to a local image that will be used for the icon.
148+
You may also use ``.svg`` images as if they were FontAwesome with a little additional setup.
149+
150+
Bitmap image icons
151+
~~~~~~~~~~~~~~~~~~
152+
153+
For all bitmap image icons such as ``.png``, ``.jpg``, etc., you must specify ``type`` as local.
154+
155+
.. note::
156+
157+
All icon images with ``"type": "local"`` are inserted into the document using ``<img>`` tags.
158+
If you need features specific to objects in the ``svg`` class please see :ref:`svg image icons <svg-image-icons>`
148159

149160
**To display an image on the web**, use ``"type": "url"``, and provide a URL to an image in the ``icon`` value.
150161
For example:
@@ -188,6 +199,65 @@ For example:
188199

189200
Use ``.svg`` images for a higher-resolution output that behaves similarly across screen sizes.
190201

202+
.. _svg-image-icons:
203+
204+
SVG image icons
205+
~~~~~~~~~~~~~~~
206+
207+
In order to make use of the full feature set of ``.svg`` images provided by HTML you will need
208+
to set up the ``.svg`` to be used as a FontAwesome type icon. This is a fairly straightforward process:
209+
210+
#. Copy the contents of ``custom-icon.js`` - located within the ``docs`` tree - into an appropriate directory of your documentation
211+
source (typically ``source/js``) and rename the file however you like. Highlighted below are the lines which must be modified
212+
213+
.. code:: javascript
214+
215+
prefix: "fa-custom",
216+
iconName: "pypi",
217+
icon: [
218+
17.313, // viewBox width
219+
19.807, // viewBox height
220+
[], // ligature
221+
"e001", // unicode codepoint - private use area
222+
"m10.383 0.2-3.239 ...", // string definined SVG path
223+
],
224+
225+
226+
#. Update the following file contents:
227+
228+
#. ``iconName`` to be one of our choosing
229+
#. Change the viewbox height and width to match that of your icon
230+
#. Replace the SVG path string with the path which defines your custom icon
231+
232+
#. Add the relative path from your source directory to the custom javascript file to your ``conf.py``:
233+
234+
.. code:: python
235+
236+
html_js_files = [
237+
...
238+
"js/pypi-icon.js",
239+
...
240+
]
241+
242+
#. Set up the icon link in the ``html_theme_options`` as a FontAwesome icon:
243+
244+
.. code:: python
245+
246+
html_theme_options = [
247+
...
248+
"icon_links": [
249+
{
250+
"name": "PyPI",
251+
"url": "https://www.pypi.org",
252+
"icon": "fa-custom fa-pypi",
253+
"type": "fontawesome",
254+
},
255+
],
256+
...
257+
]
258+
259+
That's it, your icon will now be inserted with the ``<svg>`` tag and not ``<img>``! You can reference your custom FontAwesome icon in CSS using ``fa-<custom-name>``.
260+
191261
.. _icon-link-shortcuts:
192262

193263
Icon Link Shortcuts

docs/user_guide/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@ accessibility
7474
analytics
7575
static_assets
7676
performance
77+
warnings
7778
readthedocs
7879
```

docs/user_guide/layout.rst

+6-23
Original file line numberDiff line numberDiff line change
@@ -518,29 +518,12 @@ Below is a list of built-in templates that you can insert into any section.
518518
Note that some of them may have CSS rules that assume a specific section (and
519519
will be named accordingly).
520520

521-
.. refer to files in: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/
522-
523-
- ``breadcrumbs.html``
524-
- ``copyright.html``
525-
- ``edit-this-page.html``
526-
- ``footer-article/prev-next.html``
527-
- ``icon-links.html``
528-
- ``last-updated.html``
529-
- ``navbar-icon-links.html``
530-
- ``navbar-logo.html``
531-
- ``navbar-nav.html``
532-
- ``page-toc.html``
533-
- ``searchbox.html``
534-
- ``search-button.html``
535-
- ``search-field.html``
536-
- ``sidebar-ethical-ads.html``
537-
- ``sidebar-nav-bs.html``
538-
- ``sourcelink.html``
539-
- ``sphinx-version.html``
540-
- ``theme-switcher.html``
541-
- ``version-switcher.html``
542-
- ``indices.html``
543-
- ``theme-version.html``
521+
.. note::
522+
523+
When adding/changing/overwritting a component, the ".html" suffix is optional.
524+
That's why all of them are displayed without it in the following list.
525+
526+
.. component-list::
544527

545528

546529
Add your own HTML templates to theme sections

docs/user_guide/theme-elements.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ You can add a link to equations like the one above {eq}`My label` and {eq}`My la
4848

4949
## Code blocks
5050

51-
Code block styling is inspired by [GitHub's code block style](https://primer.style/css/components/markdown) and also has support for Code Block captions/titles.
51+
Code block styling is inspired by [GitHub's code block style](https://primer.style/components/markdown) and also has support for Code Block captions/titles.
5252
See [the Sphinx documentation on code blocks](https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block) for more information.
5353

5454
```python

docs/user_guide/warnings.rst

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
Theme changes, deprecations, and warnings
3+
=========================================
4+
5+
Generally speaking, the best source of information about changes to the theme will be the release changelog.
6+
We try to avoid raising warnings within theme code, which means sometimes the theme will change (perhaps significantly) without deprecation warnings or other alerts.
7+
Still, we occasionally do warn about things like (upcoming) changes to the theme's default config values.
8+
If you prefer *not* to receive such warnings, there is a config value to suppress them:
9+
10+
.. code-block::
11+
:caption: conf.py
12+
13+
html_theme_options = {
14+
"surface_warnings": False
15+
}

noxfile.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def docs(session: nox.Session) -> None:
7777
"-v",
7878
"-w",
7979
"warnings.txt",
80+
# suppress Py3.11's new "can't debug frozen modules" warning
81+
env=dict(PYDEVD_DISABLE_FILE_VALIDATION="1"),
8082
)
8183
session.run("python", "tests/utils/check_warnings.py")
8284

@@ -92,7 +94,13 @@ def docs_live(session: nox.Session) -> None:
9294
"sphinx-theme-builder[cli]@git+https://github.com/pradyunsg/sphinx-theme-builder#egg=d9f620b"
9395
)
9496
session.run(
95-
"stb", "serve", "docs", "--open-browser", "--re-ignore=locale|api|_build"
97+
"stb",
98+
"serve",
99+
"docs",
100+
"--open-browser",
101+
r"--re-ignore=locale|api|_build|\.jupyterlite\.doit\.db",
102+
# suppress Py3.11's new "can't debug frozen modules" warning
103+
env=dict(PYDEVD_DISABLE_FILE_VALIDATION="1"),
96104
)
97105

98106

0 commit comments

Comments
 (0)