Skip to content

Commit 6e536c2

Browse files
trallardTania Allardstevepiercygabalafoupre-commit-ci[bot]
authored
MAINT - Fix linkcheck failures (#2207)
We have a few broken links/redirects in the docs that are currently causing the CI to fail. This PR should fix these. --------- Co-authored-by: Tania Allard <[email protected]> Co-authored-by: Steve Piercy <[email protected]> Co-authored-by: gabalafou <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 25bec73 commit 6e536c2

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

docs/community/design-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ color and typography in the PyData Sphinx theme:
167167
including font stacks, sizes, and weights in the
168168
[`fonts.scss` file](https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss).
169169
2. You can find all the PyData Sphinx theme colors in the
170-
[`color.scss` file](https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/assets/styles/variables/_color.scss)
170+
[`color.scss` file](https://github.com/pydata/pydata-sphinx-theme/tree/main/src/pydata_sphinx_theme/assets/styles/variables/_color.scss)
171171
2. **Figma Design File:** The Figma file contains the visual design and specifications
172172
for the typography styles, including font sizes, line heights,
173173
and spacing used throughout the theme. It also includes our color palette and its use cases, as well as details on interactive components and their states.

docs/community/inspiration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ When making new decisions about design and UI/UX, we often consult these themes
1919
link: https://docs.docker.com/
2020
image: ../_static/inspiration/docker-mark-blue.svg
2121
- title: "**PyTorch**"
22-
link: https://pytorch.org/docs/stable/index.html
22+
link: https://docs.pytorch.org/docs/stable/index.html
2323
image: https://docs.pytorch.org/docs/stable/_static/images/logo-dark.svg
2424
- title: "**Docasaurus**"
2525
link: https://docusaurus.io/docs

docs/community/topics/assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ Our Webpack build generates a collection of [Jinja macros](https://jinja.pallets
5252

5353
These macros are imported in the main `layout.html` file, and then inserted at various places on the page to link the static assets.
5454

55-
Some assets [are "preloaded"](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload), meaning that the browser begins requesting these resources before they're needed.
55+
Some assets [are "preloaded"](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/preload), meaning that the browser begins requesting these resources before they're needed.
5656
In particular, our JavaScript assets are preloaded in `<head>`, and the scripts are loaded at the end of `<body>`.

docs/conf.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ def setup(app: Sphinx) -> Dict[str, Any]:
377377
# get a 403 on CI
378378
"https://canvas.workday.com/styles/tokens/type",
379379
"https://unsplash.com/",
380+
r"https://www.gnu.org/software/gettext/.*",
380381
]
381382

382383
linkcheck_allowed_redirects = {
@@ -389,7 +390,7 @@ def setup(app: Sphinx) -> Dict[str, Any]:
389390
r"https://virtualenv.pypa.io/": "https://virtualenv.pypa.io/en/latest/",
390391
# catching redirects in rtd
391392
r"https://[A-Za-z\d_\-\.]+.readthedocs.io/": r"https://[A-Za-z\d_\-\.]+\.readthedocs\.io(/en)?/(stable|latest)/",
392-
r"https://readthedocs.org/": r"https://about.readthedocs.com\?ref=readthedocs.org",
393+
r"https://readthedocs.org/": r"https://about.readthedocs.com/\?ref=app.readthedocs.org",
393394
r"https://app.readthedocs.org/dashboard/": r"https://app.readthedocs.org/accounts/login/\?next=/dashboard/",
394395
# miscellanenous urls
395396
r"https://python.arviz.org/": "https://python.arviz.org/en/stable/",
@@ -398,8 +399,10 @@ def setup(app: Sphinx) -> Dict[str, Any]:
398399
r"https://gitlab.com": "https://about.gitlab.com/",
399400
r"http://www.yahoo.com": "https://www.yahoo.com/",
400401
r"https://feature-engine.readthedocs.io/": "https://feature-engine.trainindata.com/en/latest/",
402+
r"https://picsum.photos/": r"https://fastly.picsum.photos/",
401403
}
402404

403405
# we have had issues with linkcheck timing and retries on www.gnu.org
404-
linkcheck_retries = 3
405-
linkcheck_timeout = 50
406+
linkcheck_retries = 1
407+
linkcheck_timeout = 5
408+
linkcheck_report_timeouts_as_broken = True

docs/user_guide/fonts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The default body and header fonts can be changed as follows:
4848
{% endblock %}
4949

5050
Your text may quickly show up as "unstyled" before the fonts are loaded. To reduce this, you may wish to explore options for
51-
`preloading content <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload>`__,
51+
`preloading content <https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/preload>`__,
5252
specifically the binary font files. This ensures the files will be loaded
5353
before the CSS is parsed, but should be used with care.
5454

0 commit comments

Comments
 (0)