2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

Introduce new Sphinx role iscman for ISC manual pages

The new directive and role "iscman" allow to tag & reference man pages in
our source tree. Essentially it is just namespacing for ISC man pages,
but it comes with couple benefits.

Differences from .. _man_program label we formerly used:
- Does not expand :ref:`man_program` into full text of the page header.
- Generates index entry with category "manual page".
- Rendering style is closer to ubiquitous to the one produced
  by ``named`` syntax.

Differences from Sphinx built-in :manpage: role:
- Supports all builders with support for cross-references.
- Generates internal links (unlike :manpage: which generates external
  URLs).
- Checks that target exists withing our source tree.
This commit is contained in:
Petr Špaček
2022-03-03 15:32:35 +01:00
parent ccc6378355
commit 7e7a946d44
35 changed files with 39 additions and 1 deletions

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: named-checkconf
.. program:: named-checkconf
.. _man_named-checkconf:

View File

@@ -13,6 +13,7 @@
.. BEWARE: Do not forget to edit also named-compilezone.rst!
.. iscman:: named-checkzone
.. program:: named-checkzone
.. _man_named-checkzone:

View File

@@ -13,6 +13,7 @@
.. BEWARE: Do not forget to edit also named-checkzone.rst!
.. iscman:: named-compilezone
.. program:: named-compilezone
.. _man_named-compilezone:

View File

@@ -13,6 +13,7 @@
.. BEWARE: Do not forget to edit also tsig-keygen.rst!
.. iscman:: ddns-confgen
.. program:: ddns-confgen
.. _man_ddns-confgen:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: rndc-confgen
.. program:: rndc-confgen
.. _man_rndc-confgen:

View File

@@ -13,6 +13,7 @@
.. BEWARE: Do not forget to edit also ddns-confgen.rst!
.. iscman:: tsig-keygen
.. program:: tsig-keygen
.. _man_tsig-keygen:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: delv
.. program:: delv
.. _man_delv:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dig
.. program:: dig
.. _man_dig:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: host
.. program:: host
.. _man_host:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: nslookup
.. program:: nslookup
.. _man_nslookup:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-cds
.. program:: dnssec-cds
.. _man_dnssec-cds:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-dsfromkey
.. program:: dnssec-dsfromkey
.. _man_dnssec-dsfromkey:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-importkey
.. program:: dnssec-importkey
.. _man_dnssec-importkey:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-keyfromlabel
.. program:: dnssec-keyfromlabel
.. _man_dnssec-keyfromlabel:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-keygen
.. program:: dnssec-keygen
.. _man_dnssec-keygen:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-revoke
.. program:: dnssec-revoke
.. _man_dnssec-revoke:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-settime
.. program:: dnssec-settime
.. _man_dnssec-settime:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-signzone
.. program:: dnssec-signzone
.. _man_dnssec-signzone:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnssec-verify
.. program:: dnssec-verify
.. _man_dnssec-verify:

View File

@@ -11,6 +11,8 @@
.. highlight: console
.. iscman:: named.conf
named.conf - configuration file for **named**
---------------------------------------------

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: named
.. program:: named
.. _man_named:

View File

@@ -9,6 +9,7 @@
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. iscman:: nsupdate
.. program:: nsupdate
.. _man_nsupdate:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: filter-a
.. _man_filter-a:
filter-a.so - filter A in DNS responses when AAAA is present

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: filter-aaaa
.. _man_filter-aaaa:
filter-aaaa.so - filter AAAA in DNS responses when A is present

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: rndc.conf
.. program:: rndc.conf
.. _man_rndc.conf:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: rndc
.. program:: rndc
.. _man_rndc:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: arpaname
.. program:: arpaname
.. _man_arpaname:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: dnstap-read
.. program:: dnstap-read
.. _man_dnstap-read:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: mdig
.. program:: mdig
.. _man_mdig:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: named-journalprint
.. program:: named-journalprint
.. _man_named-journalprint:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: named-nzd2nzf
.. program:: named-nzd2nzf
.. _man_named-nzd2nzf:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: named-rrchecker
.. program:: named-rrchecker
.. _man_named-rrchecker:

View File

@@ -11,6 +11,7 @@
.. highlight: console
.. iscman:: nsec3hash
.. program:: nsec3hash
.. _man_nsec3hash:

View File

@@ -81,8 +81,9 @@ class GitLabRefRole(ReferenceRole):
raise ValueError
def setup(_):
def setup(app):
roles.register_local_role('gl', GitLabRefRole(GITLAB_BASE_URL))
app.add_crossref_type('iscman', 'iscman', 'pair: %s; manual page')
#
# Configuration file for the Sphinx documentation builder.

View File

@@ -116,3 +116,6 @@ rst_epilog = """
.. |named_pid| replace: ``@runstatedir@/named.pid``
.. |session_key| replace: ``@runstatedir@/session.key``
"""
def setup(app):
app.add_crossref_type('iscman', 'iscman', 'pair: %s; manual page')