Skip to content

Commit 25238e9

Browse files
committed
🔧 Add sphinx sitemap
1 parent 96dd8e5 commit 25238e9

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

docs/conf.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
# -- General configuration ---------------------------------------------------
2323
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
2424

25-
extensions = ["sphinx_design", "sphinxext.opengraph", "sphinx_copybutton"]
25+
extensions = [
26+
"sphinx_design",
27+
"sphinxext.opengraph",
28+
"sphinx_copybutton",
29+
"sphinx_sitemap",
30+
]
2631

2732
templates_path = ["_templates"]
2833
exclude_patterns = ["README.rst", "lib/*"]
@@ -39,3 +44,19 @@
3944
html_static_path = ["_static"]
4045
html_logo = "_static/images/logo/logo.png"
4146
html_favicon = "_static/images/logo/favicon.ico"
47+
48+
# -- Linkcheck configuration -------------------------------------------------
49+
50+
linkcheck_ignore = [
51+
r"http://shop.oreilly.com/*",
52+
]
53+
54+
# -- sitemap configuration ---------------------------------------------------
55+
56+
sitemap_url_scheme = "{link}"
57+
sitemap_excludes = [
58+
"404.html",
59+
"search.html",
60+
"genindex.html",
61+
]
62+
sitemap_show_lastmod = True

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ docs = [
2020
"furo",
2121
"sphinxext-opengraph",
2222
"sphinx-copybutton",
23+
"sphinx-sitemap",
2324
]
2425

2526
dev = [

0 commit comments

Comments
 (0)