]> git.puffer.fish Git - matthieu/frr.git/commitdiff
doc: update sphinx configs for RTD changes
authorQuentin Young <qlyoung@qlyoung.net>
Wed, 21 Aug 2024 23:38:09 +0000 (19:38 -0400)
committerQuentin Young <qlyoung@qlyoung.net>
Wed, 21 Aug 2024 23:38:51 +0000 (19:38 -0400)
Read The Docs made some changes that require us to add some
configuration in our build config files.

Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
doc/developer/conf.py
doc/user/conf.py

index 495c604ae091b62e099170e7220379a8473f8bac..d158ded72165e32b56174251378fd79ae53e9a68 100644 (file)
@@ -66,6 +66,13 @@ version = u"?.?"
 # The full version, including alpha/beta/rc tags.
 release = u"?.?-?"
 
+# Set canonical URL from the Read the Docs Domain
+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
+
 
 # -----------------------------------------------------------------------------
 # Extract values from codebase for substitution into docs.
index 728f9c936486b3affc78edd4c18d22f26c6f834c..6d47b7e69cdedb7b849882792b6ccf83cc0cd173 100644 (file)
@@ -65,6 +65,16 @@ version = u"?.?"
 # The full version, including alpha/beta/rc tags.
 release = u"?.?-?"
 
+# RTD configuration
+
+# Set canonical URL from the Read the Docs Domain
+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
+
+
 
 # -----------------------------------------------------------------------------
 # Extract values from codebase for substitution into docs.