Skip to content

Commit c24b4b4

Browse files
authored
Update some of the diverging links. (#2008)
Update the script with colors for better readability. It is weird but www.sphinx-doc.org redirects to sphinx-doc.org/en/master, and display docs. But base sphinx-doc.org/ (without www) hangs for me.
1 parent 5135b8f commit c24b4b4

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

docs/community/structure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Location and structure of documentation
44

55
The documentation for this theme is in the `docs/` folder.
6-
It is structured as a [Sphinx documentation site](https://sphinx-doc.org).
6+
It is structured as a [Sphinx documentation site](https://www.sphinx-doc.org/).
77
The content is written in a combination of reStructuredText and MyST Markdown.
88

99
## Location and structure of CSS/JS assets

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"external_links": [
149149
{
150150
"url": "https://pydata.org",
151-
"name": "PyData",
151+
"name": "PyData Website",
152152
},
153153
{
154154
"url": "https://numfocus.org/",

docs/examples/kitchen-sink/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Kitchen Sink
88

99
.. note::
1010

11-
The Kitchen Sink was generated from the `Sphinx Themes website <https://sphinx-themes.org/>`_, a community-supported showcase of themes for `Sphinx <https://sphinx-doc.org>`_.
11+
The Kitchen Sink was generated from the `Sphinx Themes website <https://sphinx-themes.org/>`_, a community-supported showcase of themes for `Sphinx <https://www.sphinx-doc.org/>`_.
1212
Check it out to see other great themes.
1313

1414
.. button-link:: https://sphinx-themes.org

docs/scripts/update_kitchen_sink.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
EXTRA_MESSAGE = """\
77
.. note::
88
9-
The Kitchen Sink was generated from the `Sphinx Themes website <https://sphinx-themes.org/>`_, a community-supported showcase of themes for `Sphinx <https://sphinx-doc.org>`_.
9+
The Kitchen Sink was generated from the `Sphinx Themes website <https://sphinx-themes.org/>`_, a community-supported showcase of themes for `Sphinx <https://www.sphinx-doc.org/>`_.
1010
Check it out to see other great themes.
1111
1212
.. button-link:: https://sphinx-themes.org

tools/divergent_links.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from urllib.parse import urljoin
2323

2424
from bs4 import BeautifulSoup
25+
from rich import print
2526

2627
# when looking at inconsistent links across pages,
2728
# a number of text is recurrent and appear on many pages.
@@ -90,16 +91,16 @@ def duplicates(self):
9091
uniq_url = {u for u, _ in url_pages}
9192
if len(uniq_url) >= 2:
9293
print(
93-
f'The link text "{content!r}" appears {len(url_pages)} times, '
94+
f"The link text [red]{content!r}[/red] appears {len(url_pages)} times, "
9495
f"and links to {len(uniq_url)} different URLs, on the following pages:"
9596
)
9697
dct = defaultdict(list)
9798
for u, p in url_pages:
9899
dct[u].append(p)
99100
for u, ps in dct.items():
100-
print(" ", u, "in")
101-
for p in ps:
102-
print(" ", p)
101+
print(f" [blue]{u}[/blue] in")
102+
for p in set(ps):
103+
print(f" [green]{p}[/green]")
103104

104105

105106
if len(sys.argv) == 3 and sys.argv[2] == "--all":

0 commit comments

Comments
 (0)