From ef2a79be603d758f104482c0a7fe3d4d79f53dc3 Mon Sep 17 00:00:00 2001 From: LoGin Date: Wed, 17 Jul 2024 13:54:28 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0sphinx=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=85=8D=E7=BD=AE=EF=BC=8C=E9=80=82=E5=BA=94read=20th?= =?UTF-8?q?e=20docs=E7=9A=84=E6=9B=B4=E6=96=B0=20(#850)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据read the docs在7月15日blog,进行此修改 https://about.readthedocs.com/blog/2024/07/addons-by-default/ --- docs/conf.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a772f3d6..6410fc76 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,15 +10,14 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os +import os # import sys # sys.path.insert(0, os.path.abspath('.')) - # -- Project information ----------------------------------------------------- project = 'DragonOS' -copyright = '2022-2023, DragonOS Community' +copyright = '2022-2024, DragonOS Community' author = 'longjin' # The full version, including alpha/beta/rc tags @@ -73,4 +72,12 @@ myst_enable_extensions = [ "strikethrough", "substitution", "tasklist", -] \ No newline at end of file +] + + +# Define the canonical URL if you are using a custom domain on Read the Docs +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + html_context["READTHEDOCS"] = True \ No newline at end of file