From c0f71e6c7504583bbe3c600f41bbff5a55f483ed Mon Sep 17 00:00:00 2001 From: David Douard <david.douard@sdfa3.org> Date: Mon, 19 Nov 2018 11:42:36 +0100 Subject: [PATCH] Add a swh_substitution file and make it included in every rst file so that we can have some generic substitutions which can be used consistently in the doc. --- docs/swh_substitutions | 1 + swh/docs/sphinx/conf.py | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 docs/swh_substitutions diff --git a/docs/swh_substitutions b/docs/swh_substitutions new file mode 100644 index 00000000..b28bba35 --- /dev/null +++ b/docs/swh_substitutions @@ -0,0 +1 @@ +.. |swh| replace:: *Software Heritage* diff --git a/swh/docs/sphinx/conf.py b/swh/docs/sphinx/conf.py index 95d0ac3d..b7b56245 100755 --- a/swh/docs/sphinx/conf.py +++ b/swh/docs/sphinx/conf.py @@ -37,6 +37,12 @@ source_parsers = { # The master toctree document. master_doc = 'index' +# A string of reStructuredText that will be included at the beginning of every +# source file that is read. +rst_prolog = ''' +.. include:: /swh_substitutions +''' + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. -- GitLab