Skip to content

Commit baa8d6a

Browse files
committed
Chore: Fix broken links / satisfy link checker
1 parent d432e99 commit baa8d6a

12 files changed

Lines changed: 38 additions & 25 deletions

CHANGES.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
- Dependencies: Added compatibility with sphinx 7 - 9
88

99
## v0.4.0 - 2024-06-27
10-
- Dependencies: Update to sphinx-design 0.6.0
11-
See also [sphinx-design change log].
10+
- Dependencies: Updated to [sphinx-design 0.6.0]
1211
- Remove support for Python 3.7 and 3.8, following `sphinx-design`.
1312

1413
## v0.3.2 - 2024-05-28
@@ -41,4 +40,4 @@
4140
- Add "tag(s)" shortcuts, using roles `tag` and `tags`
4241

4342

44-
[sphinx-design change log]: https://sphinx-design.readthedocs.io/en/furo-theme/changelog.html#v0-6-0-2024-05-23
43+
[sphinx-design 0.6.0]: https://github.com/executablebooks/sphinx-design/releases/tag/v0.6.0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ and maintaining [MyST Parser] and [sphinx-design].
7171
[sphinx-design-elements]: https://sphinx-design-elements.readthedocs.io/
7272

7373
[badge-coverage]: https://codecov.io/gh/tech-writing/sphinx-design-elements/branch/main/graph/badge.svg
74-
[badge-downloads-per-month]: https://pepy.tech/badge/sphinx-design-elements/month
74+
[badge-downloads-per-month]: https://static.pepy.tech/badge/sphinx-design-elements/month
7575
[badge-license]: https://img.shields.io/github/license/tech-writing/sphinx-design-elements.svg
7676
[badge-docutils-versions]: https://img.shields.io/badge/docutils-0.19%20--%200.22-blue.svg
7777
[badge-package-version]: https://img.shields.io/pypi/v/sphinx-design-elements.svg
@@ -80,7 +80,7 @@ and maintaining [MyST Parser] and [sphinx-design].
8080
[badge-status]: https://img.shields.io/pypi/status/sphinx-design-elements.svg
8181
[badge-tests]: https://github.com/tech-writing/sphinx-design-elements/actions/workflows/main.yml/badge.svg
8282
[project-codecov]: https://codecov.io/gh/tech-writing/sphinx-design-elements
83-
[project-downloads]: https://pepy.tech/project/sphinx-design-elements/
83+
[project-downloads]: https://pepy.tech/project/sphinx-design-elements
8484
[project-docutils]: https://docutils.sourceforge.io/
8585
[project-license]: https://github.com/tech-writing/sphinx-design-elements/blob/main/LICENSE
8686
[project-pypi]: https://pypi.org/project/sphinx-design-elements

docs/backlog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ orphan: true
77
- Documentation: Render on multiple themes, like `sphinx-design`.
88
- From `sphinx-design`
99
- horizontal card (grid row inside card, picture on left)
10-
- subtitle for card (see <https://material.io/components/cards#anatomy>)
10+
- subtitle for card (see <https://m3.material.io/components/cards/guidelines>)
1111
- hyper: Maintain a synthetic intersphinx inventory for caching titles from
1212
extracted HTML pages, so that subsequent invocations do not need to
1313
extract titles over and over again.

docs/conf.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
}
3535

3636
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
37+
38+
# Configure link checker.
39+
linkcheck_ignore = [
40+
"https://github.com/",
41+
"https://jkalina.carrd.co/",
42+
"https://simpleicons.org/",
43+
"https://unsplash.com/",
44+
]
45+
linkcheck_anchors_ignore_for_url = [
46+
# Requires JavaScript.
47+
# After opting-in to new GitHub issues, Sphinx can no longer grok the HTML anchor references.
48+
"https://github.com/",
49+
]
50+
3751
myst_enable_extensions = [
3852
"attrs_block",
3953
"attrs_inline",

docs/infocard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ without the maintenance nightmares of tables.
2222

2323
:::{grid-item}
2424
:columns: 8
25-
[example.org/beagles](https://example.org/beagles)
25+
[example.org](https://example.org/)
2626

2727
A module for collecting votes from beagles, \
2828
and for consolidating them.

docs/snippets/myst/infocard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
:::{grid-item}
44
:columns: 8
5-
[example.org/beagles](https://example.org/beagles)
5+
[example.org](https://example.org/)
66

77
A module for collecting votes from beagles, \
88
and for consolidating them.

docs/snippets/rst/infocard.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. grid-item::
44
:columns: 8
55

6-
`example.org/beagles <https://example.org/beagles>`_
6+
`example.org <https://example.org/>`_
77

88
| A module for collecting votes from beagles,
99
| and for consolidating them.

tests/test_hyper.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_hyper_http_url_valid(sphinx_doctree_no_tr: CreateDoctree):
2121
ptree
2222
== """
2323
<reference refuri="https://example.org">
24-
Example Domain
24+
https://example.org
2525
""".lstrip()
2626
)
2727

@@ -152,7 +152,7 @@ def test_hyper_button_basic(render):
152152
== """
153153
<reference classes="sd-sphinx-override sd-btn sd-text-wrap sd-btn-primary" refuri="https://example.org">
154154
<inline>
155-
Example Domain
155+
https://example.org
156156
""".lstrip()
157157
)
158158

@@ -166,7 +166,7 @@ def test_hyper_button_with_icon(render):
166166
assert '<raw format="html"' in text
167167
assert '<svg version="1.1"' in text
168168
assert "example.org" in text
169-
assert "Example Domain" in text
169+
assert "https://example.org" in text
170170

171171

172172
def test_hyper_button_icon_only(render):
@@ -192,7 +192,7 @@ def test_hyper_badge(render):
192192
== """
193193
<reference classes="sd-sphinx-override sd-badge sd-bg-primary sd-bg-text-primary" refuri="https://example.org">
194194
<inline>
195-
Example Domain
195+
https://example.org
196196
""".lstrip()
197197
)
198198

@@ -208,7 +208,7 @@ def test_hyper_card_minimal(render):
208208
<container classes="sd-card sd-sphinx-override sd-mb-3 sd-shadow-sm sd-card-hover" design_component="card" is_div="True">
209209
<container classes="sd-card-body" design_component="card-body" is_div="True">
210210
<paragraph classes="sd-card-text">
211-
Example Domain
211+
https://example.org
212212
<PassthroughTextElement>
213213
<reference classes="sd-stretched-link sd-hide-link-text" refuri="https://example.org">
214214
<inline>
@@ -234,7 +234,7 @@ def test_hyper_card_full(render):
234234
<PassthroughTextElement>
235235
title
236236
<paragraph classes="sd-card-text">
237-
Example Domain
237+
https://example.org
238238
<container classes="sd-card-footer" design_component="card-footer" is_div="True">
239239
<paragraph classes="sd-card-text">
240240
footer

tests/test_snippets/snippet_myst_post_infocard.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<container classes="sd-row sd-m-0 sd-p-0" design_component="grid-row" is_div="True">
1111
<container classes="sd-col sd-d-flex-column sd-col-8 sd-col-xs-8 sd-col-sm-8 sd-col-md-8 sd-col-lg-8" design_component="grid-item" is_div="True">
1212
<paragraph>
13-
<reference refuri="https://example.org/beagles">
14-
example.org/beagles
13+
<reference refuri="https://example.org/">
14+
example.org
1515
<paragraph>
1616
A module for collecting votes from beagles,
1717
<raw format="html" xml:space="preserve">

tests/test_snippets/snippet_myst_pre_infocard.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<container classes="sd-row sd-m-0 sd-p-0" design_component="grid-row" is_div="True">
1111
<container classes="sd-col sd-d-flex-column sd-col-8 sd-col-xs-8 sd-col-sm-8 sd-col-md-8 sd-col-lg-8" design_component="grid-item" is_div="True">
1212
<paragraph>
13-
<reference refuri="https://example.org/beagles">
14-
example.org/beagles
13+
<reference refuri="https://example.org/">
14+
example.org
1515
<paragraph>
1616
A module for collecting votes from beagles,
1717
<raw format="html" xml:space="preserve">

0 commit comments

Comments
 (0)