]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc: conf.py: rst_prolog added
authorAleš Mrázek <ales.mrazek@nic.cz>
Wed, 13 Jul 2022 13:47:01 +0000 (15:47 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Mon, 8 Aug 2022 09:58:43 +0000 (11:58 +0200)
- global strings for yaml and lua tabs

doc/conf.py
doc/quickstart-config.rst

index 27bce230c38bde46b42b80f45ac99679b8f59442..c545a77632b76613e231d710dc4ed182179db095 100644 (file)
@@ -31,7 +31,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'Knot Resolver'
-copyright = u'2014-2020 CZ.NIC labs'
+copyright = u'2014-2022 CZ.NIC labs'
 with open('../meson.build') as f:
     for line in f:
         match = re.match(r"\s*version\s*:\s*'([^']+)'.*", line)
@@ -98,3 +98,10 @@ texinfo_documents = [
     ('index', 'knot-resolver', u'Knot Resolver', u'CZ.NIC Labs',
      'Knot Resolver', 'Caching DNS resolver.', 'Network services'),
 ]
+
+# reStructuredText that will be included at the beginning of every source file that is read.
+# This is a possible place to add substitutions that should be available in every file.
+rst_prolog = """
+.. |yaml| replace:: YAML
+.. |lua| replace:: Lua
+"""
index dcb0c08abed634caed466f3ee3fb1f93224b1a5c..fa56b6b36fa3960a6cfcd31d9b16e182cefe099c 100644 (file)
@@ -12,12 +12,12 @@ Configuration
 
 .. note::
 
-   When copy&pasting examples from this manual please pay close
-   attention to brackets and also line ordering - order of lines matters.
+            When copy&pasting examples from this manual please pay close
+            attention to brackets and also line ordering - order of lines matters.
 
-   The configuration language is in fact Lua script, so you can use full power
-   of this programming language. See article
-   `Learn Lua in 15 minutes`_ for a syntax overview.
+            The configuration language is in fact Lua script, so you can use full power
+            of this programming language. See article
+            `Learn Lua in 15 minutes`_ for a syntax overview.
 
 Easiest way to configure Knot Resolver is to paste your configuration into
 configuration file ``/etc/knot-resolver/kresd.conf``.
@@ -34,18 +34,18 @@ The following configuration instructs Knot Resolver to receive standard unencryp
 
 .. tabs::
 
-    .. group-tab:: yaml
+    .. group-tab:: |yaml|
 
         .. code-block:: yaml
 
             network:
-                listen:
-                  - interface: ['192.0.2.1', '2001:db8::1'] # unencrypted DNS on port 53 is default
-                  - interface: 'eth0'
-                    port: 853
-                    kind: 'dot'
+              listen:
+                - interface: ['192.0.2.1', '2001:db8::1'] # unencrypted DNS on port 53 is default
+                - interface: 'eth0'
+                  port: 853
+                  kind: 'dot'
 
-    .. group-tab:: lua legacy
+    .. group-tab:: |lua|
 
         Network interfaces to listen on and supported protocols are configured using :func:`net.listen()` function.
 
@@ -77,12 +77,12 @@ This configuration will forward two listed domains to a DNS server with IP addre
 
 .. tabs::
 
-    .. group-tab:: yaml
+    .. group-tab:: |yaml|
 
         .. code-block:: yaml
 
 
-    .. group-tab:: lua legacy
+    .. group-tab:: |lua|
 
         .. code-block:: lua
 
@@ -115,12 +115,12 @@ Following configuration allows only queries from clients in subnet 192.0.2.0/24
 
 .. tabs::
 
-    .. group-tab:: yaml
+    .. group-tab:: |yaml|
 
         .. code-block:: yaml
 
 
-    .. group-tab:: lua legacy
+    .. group-tab:: |lua|
 
         .. code-block:: lua
 
@@ -140,12 +140,12 @@ First step is to enable TLS on listening interfaces:
 
 .. tabs::
 
-    .. group-tab:: yaml
+    .. group-tab:: |yaml|
 
         .. code-block:: yaml
 
 
-    .. group-tab:: lua legacy
+    .. group-tab:: |lua|
 
         .. code-block:: lua
 
@@ -158,12 +158,12 @@ signed by a trusted CA. Once the certificate was obtained a path to certificate
 
 .. tabs::
 
-    .. group-tab:: yaml
+    .. group-tab:: |yaml|
 
         .. code-block:: yaml
 
 
-    .. group-tab:: lua legacy
+    .. group-tab:: |lua|
 
         .. code-block:: lua
 
@@ -178,12 +178,12 @@ Some jurisdictions mandate blocking access to certain domains. This can be achie
 
 .. tabs::
 
-    .. group-tab:: yaml
+    .. group-tab:: |yaml|
 
         .. code-block:: yaml
 
 
-    .. group-tab:: lua legacy
+    .. group-tab:: |lua|
 
         .. code-block:: lua
 
@@ -237,12 +237,12 @@ of all queries performed by this client.
 
 .. tabs::
 
-    .. group-tab:: yaml
+    .. group-tab:: |yaml|
 
         .. code-block:: yaml
 
 
-    .. group-tab:: lua legacy
+    .. group-tab:: |lua|
 
         .. code-block:: lua