From 4b041636ecc3581afc4839dad03f464d0da14cdc Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 4 Mar 2017 18:47:51 +0100 Subject: Read `rst_prolog` content from an external file. --- doc/conf.py | 14 ++++++-------- doc/prolog.inc | 7 +++++++ 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 doc/prolog.inc diff --git a/doc/conf.py b/doc/conf.py index 05d81f264..d7763c490 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -148,20 +148,18 @@ todo_include_todos = True todo_link_only = True # reST settings - -rst_prolog = """\ -.. include:: -.. |br| raw:: html - -
-""" +try: + with open("prolog.inc", "r") as prologFile: + rst_prolog = prologFile.read() +except: + rst_prolog = "" # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. #html_theme = 'alabaster' -#html_theme = "sphinx_rtd_theme" +html_theme = "sphinx_rtd_theme" # Override default css to get a larger width for ReadTheDoc build html_context = { 'css_files': [ diff --git a/doc/prolog.inc b/doc/prolog.inc new file mode 100644 index 000000000..94490f67c --- /dev/null +++ b/doc/prolog.inc @@ -0,0 +1,7 @@ +.. # preload commonly known graphical characters like © +.. include:: + +.. # define a hard kine break for HTML +.. |br| raw:: html + +
-- cgit v1.2.3