mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-26 12:08:05 +00:00
New directive .. statementlist:: generates table of statements in a the given domain (named.conf or rndc.conf). The table contains link to definition, short description, and also list of tags. Short description and tags have to be provided by user using optional parameters. E.g.: .. statement:: max-cache-size :tags: resolver, cache :short: Short description .. statementlist:: is currently not parametrized. This modification is based on Sphinx "tutorial" extension "TODO". The main trick is to use placeholder node for .. statementlist:: and replace it with table at later stage, when all source files were processed and all cross-references can be resolved. Beware, some details in Sphinx docs are not up-to-date, it's better to read Sphinx and docutil sources.
32 lines
946 B
Python
32 lines
946 B
Python
############################################################################
|
|
# 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.
|
|
############################################################################
|
|
|
|
"""
|
|
Sphinx domain "rndcconf". See iscconf.py for details.
|
|
"""
|
|
|
|
from docutils import nodes
|
|
|
|
import iscconf
|
|
|
|
|
|
class ToBeReplacedStatementList(nodes.General, nodes.Element):
|
|
"""
|
|
Placeholder, does nothing, but must be picklable
|
|
(= cannot be in a generated class).
|
|
"""
|
|
|
|
|
|
def setup(app):
|
|
return iscconf.setup(app, "rndcconf", "rndc.conf", ToBeReplacedStatementList)
|