diff --git a/bin/named/named.conf.rst b/bin/named/named.conf.rst index c53ada236b..89e76bd99c 100644 --- a/bin/named/named.conf.rst +++ b/bin/named/named.conf.rst @@ -40,19 +40,19 @@ C++ style: // to end of line Unix style: # to end of line -.. configblock:: options +.. literalinclude:: ../../doc/misc/options Any of these zone statements can also be set inside the view statement. -.. configblock:: primary.zoneopt -.. configblock:: secondary.zoneopt -.. configblock:: mirror.zoneopt -.. configblock:: forward.zoneopt -.. configblock:: hint.zoneopt -.. configblock:: redirect.zoneopt -.. configblock:: static-stub.zoneopt -.. configblock:: stub.zoneopt -.. configblock:: in-view.zoneopt +.. literalinclude:: ../../doc/misc/primary.zoneopt +.. literalinclude:: ../../doc/misc/secondary.zoneopt +.. literalinclude:: ../../doc/misc/mirror.zoneopt +.. literalinclude:: ../../doc/misc/forward.zoneopt +.. literalinclude:: ../../doc/misc/hint.zoneopt +.. literalinclude:: ../../doc/misc/redirect.zoneopt +.. literalinclude:: ../../doc/misc/static-stub.zoneopt +.. literalinclude:: ../../doc/misc/stub.zoneopt +.. literalinclude:: ../../doc/misc/in-view.zoneopt Files ~~~~~ diff --git a/doc/arm/conf.py b/doc/arm/conf.py index fc122c1bf7..a3acd2bf04 100644 --- a/doc/arm/conf.py +++ b/doc/arm/conf.py @@ -139,10 +139,9 @@ def setup(app): # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, make it absolute. -# + sys.path.append(str(Path(__file__).resolve().parent / "_ext")) sys.path.append(str(Path(__file__).resolve().parent.parent / "misc")) -sys.path.append(str(Path(__file__).resolve().parent.parent / "ext")) # -- Project information ----------------------------------------------------- @@ -169,7 +168,7 @@ release = version # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["namedconf", "rndcconf", "configblock"] +extensions = ["namedconf", "rndcconf"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/doc/ext/configblock.py b/doc/ext/configblock.py deleted file mode 100644 index 368df5ba18..0000000000 --- a/doc/ext/configblock.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -from pathlib import Path - -from docutils import nodes - -from sphinx.application import Sphinx -from sphinx.util.docutils import SphinxDirective -from sphinx.util.typing import ExtensionMetadata - - -misc_path = Path(__file__).resolve().parent.parent.parent / "misc" - - -class ConfigBlockDirective(SphinxDirective): - required_arguments = 1 - - def run(self) -> list[nodes.Node]: - target = misc_path / self.arguments[0] - - block = "{}" if not target.exists() else target.read_text() - - return [nodes.literal_block(text=block)] - - -def setup(app: Sphinx) -> ExtensionMetadata: - app.add_directive("configblock", ConfigBlockDirective) - - return { - "version": "0.1", - "parallel_read_safe": True, - "parallel_write_safe": True, - } diff --git a/doc/ext/meson.build b/doc/ext/meson.build deleted file mode 100644 index eb9532e463..0000000000 --- a/doc/ext/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -manrst_srcset.add( - files( - 'configblock.py', - ), -) diff --git a/doc/man/conf.py b/doc/man/conf.py index 8a716cb622..2ba58b805e 100644 --- a/doc/man/conf.py +++ b/doc/man/conf.py @@ -28,7 +28,6 @@ from pathlib import Path # 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. -sys.path.append(str(Path(__file__).resolve().parent.parent / "ext")) sys.path.append(str(Path(__file__).resolve().parent.parent / "misc")) # -- Project information ----------------------------------------------------- @@ -49,7 +48,7 @@ man_make_section_directory = True # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["configblock"] +extensions = [] # Add any paths that contain templates here, relative to this directory. templates_path = ["../arm/_templates"]