summaryrefslogtreecommitdiffstatshomepage
path: root/docs
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-07-02 15:15:31 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-07-02 15:15:31 +0300
commitebce7984c66b4d977f4540506e243cf65a80db2f (patch)
treeea743aeda38c727b64d6d6850020250c8b0606ca /docs
parent5f0c56bcf1fcb7f2d36a0c420b4681a812047c59 (diff)
downloadmicropython-ebce7984c66b4d977f4540506e243cf65a80db2f.tar.gz
micropython-ebce7984c66b4d977f4540506e243cf65a80db2f.zip
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.
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/conf.py6
-rw-r--r--docs/templates/replace.inc1
2 files changed, 7 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py
index bb1d613584..b9b1125572 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -139,6 +139,12 @@ pygments_style = 'sphinx'
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
+# Global include files. Sphinx docs suggest using rst_epilog in preference
+# of rst_prolog, so we follow. Absolute paths below mean "from the base
+# of the doctree".
+rst_epilog = """
+.. include:: /templates/replace.inc
+"""
# -- Options for HTML output ----------------------------------------------
diff --git a/docs/templates/replace.inc b/docs/templates/replace.inc
new file mode 100644
index 0000000000..6ed79cc7ce
--- /dev/null
+++ b/docs/templates/replace.inc
@@ -0,0 +1 @@
+.. # This file is intended for global "replace" definitions.