Skip to content

Commit ef2a79b

Browse files
authored
chore: 更新sphinx相关配置,适应read the docs的更新 (#850)
根据read the docs在7月15日blog,进行此修改 https://about.readthedocs.com/blog/2024/07/addons-by-default/
1 parent 9a4832f commit ef2a79b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

docs/conf.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010
# add these directories to sys.path here. If the directory is relative to the
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
13-
# import os
13+
import os
1414
# import sys
1515
# sys.path.insert(0, os.path.abspath('.'))
1616

17-
1817
# -- Project information -----------------------------------------------------
1918

2019
project = 'DragonOS'
21-
copyright = '2022-2023, DragonOS Community'
20+
copyright = '2022-2024, DragonOS Community'
2221
author = 'longjin'
2322

2423
# The full version, including alpha/beta/rc tags
@@ -73,4 +72,12 @@
7372
"strikethrough",
7473
"substitution",
7574
"tasklist",
76-
]
75+
]
76+
77+
78+
# Define the canonical URL if you are using a custom domain on Read the Docs
79+
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
80+
81+
# Tell Jinja2 templates the build is running on Read the Docs
82+
if os.environ.get("READTHEDOCS", "") == "True":
83+
html_context["READTHEDOCS"] = True

0 commit comments

Comments
 (0)