Skip to content

Commit

Permalink
Merge pull request #196 from KyoriPowered/feat/sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger authored Jan 26, 2025
2 parents b487c68 + 84906e7 commit 9b5f31d
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 89 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ sphinx-substitution-extensions = "*"
sphinx-github-changelog = "*"
sphinx-copybutton = "*"
sphinx-reredirects = "*"
sphinx-sitemap = "*"
pygments = "*"
sphinx-github-role = { git = "https://github.com/astrojuanlu/sphinx-github-role.git", ref = "main", editable = true }
myst-parser = "*"
Expand Down
178 changes: 93 additions & 85 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from pathlib import Path

project = 'Adventure'
copyright = '2020-2024 KyoriPowered'
copyright = '2020-2025 KyoriPowered'
author = 'KyoriPowered'

# The short X.Y versions
Expand All @@ -49,6 +49,7 @@
.. |mod_version| replace:: {platform_mod_version}
"""

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

ogp_site_url = html_baseurl
ogp_site_url = html_baseurl

gettext_compact = False
locale_dirs = [ '../locale/']
Expand All @@ -85,6 +84,7 @@
'sphinx_reredirects',
'sphinx_github_role',
'sphinx_copybutton',
'sphinx_sitemap',
'sphinxext.opengraph',
'minimessage_hl',
'myst_parser',
Expand All @@ -99,6 +99,8 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_ext']

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

# General style

Expand Down Expand Up @@ -170,3 +172,6 @@
ogp_social_cards = {
"enable": False
}

# sphinx-sitemap
sitemap_url_scheme = "{link}"
3 changes: 3 additions & 0 deletions source/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
User-agent: *

Sitemap: https://docs.advntr.dev/sitemap.xml

0 comments on commit 9b5f31d

Please sign in to comment.