Skip to content

Commit ebce798

Browse files
committed
docs/conf.py: Add file for global replacements definition.
The idea is to allow to define a kind of "macros" for repeatitive text, so all occurrances can be updated in one place. Unfortunately, RST doesn't support replacements with arguments, which limits usefulness of them and should be taken into account.
1 parent 5f0c56b commit ebce798

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@
139139
# If true, keep warnings as "system message" paragraphs in the built documents.
140140
#keep_warnings = False
141141

142+
# Global include files. Sphinx docs suggest using rst_epilog in preference
143+
# of rst_prolog, so we follow. Absolute paths below mean "from the base
144+
# of the doctree".
145+
rst_epilog = """
146+
.. include:: /templates/replace.inc
147+
"""
142148

143149
# -- Options for HTML output ----------------------------------------------
144150

docs/templates/replace.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. # This file is intended for global "replace" definitions.

0 commit comments

Comments
 (0)