Skip to content
Snippets Groups Projects
Commit c5834f11 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

sphinx/conf.py: Inline swh substitution instead of including it

It simplifies documentation build configuration as the include path
might change depending on where the sphinx-build command is invoked.
parent c0cc9693
No related branches found
No related tags found
No related merge requests found
.. |swh| replace:: *Software Heritage*
...@@ -57,14 +57,9 @@ master_doc = "index" ...@@ -57,14 +57,9 @@ master_doc = "index"
# A string of reStructuredText that will be included at the beginning of every # A string of reStructuredText that will be included at the beginning of every
# source file that is read. # source file that is read.
# A bit hackish but should work both for each swh package and the whole swh-doc # A bit hackish but should work both for each swh package and the whole swh-doc
if os.path.exists("../../docs/swh_substitutions"): rst_prolog = """
rst_prolog = """ .. |swh| replace:: *Software Heritage*
.. include:: /../../docs/swh_substitutions """
"""
elif os.path.exists("../../swh-docs/docs/swh_substitutions"):
rst_prolog = """
.. include:: /../../swh-docs/docs/swh_substitutions
"""
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment