]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ignore :option: references in rst files to to simplify doc backports
authorPetr Špaček <pspacek@isc.org>
Tue, 5 Apr 2022 12:30:11 +0000 (14:30 +0200)
committerPetr Špaček <pspacek@isc.org>
Thu, 7 Apr 2022 13:46:55 +0000 (15:46 +0200)
Override Sphinx built-in :option: to act and render as `` literal.
This avoids problems with undefined :option:`target`s when merging
doc backports.

doc/arm/conf.py
doc/man/conf.py

index b147521a9e7d271ad7b88b99f371cb651cca694a..559e44958b76e470094cae7034b2c25ce1e3a261 100644 (file)
@@ -82,6 +82,8 @@ class GitLabRefRole(ReferenceRole):
 def setup(app):
     roles.register_local_role('gl', GitLabRefRole(GITLAB_BASE_URL))
     app.add_crossref_type('iscman', 'iscman', 'pair: %s; manual page')
+    # ignore :option: references to simplify doc backports to v9_16 branch
+    app.add_role_to_domain('std', 'option', roles.code_role, override=True)
 
 #
 # Configuration file for the Sphinx documentation builder.
index b3814848cc488e3b366bfd7bac01034b7499b92d..2c792377813af78063e895dd732c78ed3f8fc079 100644 (file)
@@ -10,6 +10,8 @@
 # information regarding copyright ownership.
 
 # flake8: noqa: E501
+import datetime
+from docutils.parsers.rst import roles
 
 #
 # Configuration file for the Sphinx documentation builder.
@@ -32,7 +34,6 @@
 
 project = 'BIND 9'
 # pylint: disable=wrong-import-position
-import datetime
 year = datetime.datetime.now().year
 # pylint: disable=redefined-builtin
 copyright = "%d, Internet Systems Consortium" % year
@@ -109,3 +110,5 @@ man_pages = [
 
 def setup(app):
     app.add_crossref_type('iscman', 'iscman', 'pair: %s; manual page')
+    # ignore :option: references to simplify doc backports to v9_16 branch
+    app.add_role_to_domain('std', 'option', roles.code_role, override=True)