]> git.puffer.fish Git - mirror/frr.git/commitdiff
Merge pull request #16619 from qlyoung/fix-rtd-build-sphinx-environment-injection
authorJafar Al-Gharaibeh <jafar@atcorp.com>
Thu, 22 Aug 2024 04:05:24 +0000 (00:05 -0400)
committerGitHub <noreply@github.com>
Thu, 22 Aug 2024 04:05:24 +0000 (00:05 -0400)
doc: update sphinx configs for RTD changes

1  2 
doc/developer/conf.py
doc/user/conf.py

index 76dd1e4f289e81fa1cf86cc06ae971845a530740,d158ded72165e32b56174251378fd79ae53e9a68..634f4aa80420e13389a622296803172c4f9c032c
@@@ -63,10 -62,17 +63,17 @@@ author = "FRR authors
  # built documents.
  
  # The short X.Y version.
 -version = u"?.?"
 +version = "?.?"
  # The full version, including alpha/beta/rc tags.
 -release = u"?.?-?"
 +release = "?.?-?"
  
+ # 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 18f048bc08361561ccabea950b699b67b507624e,6d47b7e69cdedb7b849882792b6ccf83cc0cd173..236a90e9026bcc1f88e826c839228e54cff707a7
@@@ -63,10 -61,20 +63,20 @@@ author = "FRR authors
  # built documents.
  
  # The short X.Y version.
 -version = u"?.?"
 +version = "?.?"
  # The full version, including alpha/beta/rc tags.
 -release = u"?.?-?"
 +release = "?.?-?"
  
+ # 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.