Skip to content

Commit 9b5f31d

Browse files
authored
Merge pull request #196 from KyoriPowered/feat/sitemap
2 parents b487c68 + 84906e7 commit 9b5f31d

File tree

4 files changed

+106
-89
lines changed

4 files changed

+106
-89
lines changed

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ sphinx-substitution-extensions = "*"
1313
sphinx-github-changelog = "*"
1414
sphinx-copybutton = "*"
1515
sphinx-reredirects = "*"
16+
sphinx-sitemap = "*"
1617
pygments = "*"
1718
sphinx-github-role = { git = "https://github.com/astrojuanlu/sphinx-github-role.git", ref = "main", editable = true }
1819
myst-parser = "*"

Pipfile.lock

Lines changed: 93 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/conf.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from pathlib import Path
2323

2424
project = 'Adventure'
25-
copyright = '2020-2024 KyoriPowered'
25+
copyright = '2020-2025 KyoriPowered'
2626
author = 'KyoriPowered'
2727

2828
# The short X.Y versions
@@ -49,6 +49,7 @@
4949
.. |mod_version| replace:: {platform_mod_version}
5050
"""
5151

52+
html_baseurl = "https://docs.advntr.dev/"
5253
if 'GITHUB_REF' in os.environ:
5354
ref = os.environ['GITHUB_REF']
5455
if ref.startswith("refs/pull/"):
@@ -61,10 +62,8 @@
6162
Please consult the pull request to view any discussion and existing reviews.
6263
"""
6364
html_baseurl = f"https://kyoripowered.github.io/adventure-docs-previews/pull/{pr_number}/"
64-
else:
65-
html_baseurl = "https://docs.advntr.dev/"
6665

67-
ogp_site_url = html_baseurl
66+
ogp_site_url = html_baseurl
6867

6968
gettext_compact = False
7069
locale_dirs = [ '../locale/']
@@ -85,6 +84,7 @@
8584
'sphinx_reredirects',
8685
'sphinx_github_role',
8786
'sphinx_copybutton',
87+
'sphinx_sitemap',
8888
'sphinxext.opengraph',
8989
'minimessage_hl',
9090
'myst_parser',
@@ -99,6 +99,8 @@
9999
# This pattern also affects html_static_path and html_extra_path.
100100
exclude_patterns = ['_ext']
101101

102+
# A list of paths that contain extra files not directly related to the documentation, such as robots.txt or .htaccess
103+
html_extra_path = ["robots.txt"]
102104

103105
# General style
104106

@@ -170,3 +172,6 @@
170172
ogp_social_cards = {
171173
"enable": False
172174
}
175+
176+
# sphinx-sitemap
177+
sitemap_url_scheme = "{link}"

source/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
User-agent: *
2+
3+
Sitemap: https://docs.advntr.dev/sitemap.xml

0 commit comments

Comments
 (0)