diff --git a/documentation-generator/run.py b/documentation-generator/run.py index 9584a762..8ccbefb1 100755 --- a/documentation-generator/run.py +++ b/documentation-generator/run.py @@ -25,6 +25,7 @@ DOCUMENTATION_SRC = "DOCUMENTATION.md" TARGET_DIR = "beta" SHIFT_HEADING = 1 TOOLS_PATH = os.path.dirname(__file__) +TEMPLATE_INDEX_PATH = os.path.join(TOOLS_PATH, "template-index.html") TEMPLATE_PATH = os.path.join(TOOLS_PATH, "template.html") FILTER_EXE = os.path.join(TOOLS_PATH, "filter.py") POSTPROCESSOR_EXE = os.path.join(TOOLS_PATH, "postprocessor.py") @@ -127,13 +128,8 @@ def run_git_fetch_and_restart_if_changed(remote_commits, target_branch): def make_index_html(branch): - return """\ - - - -
Please follow this link.
-""" % (branch, branch) + with open(TEMPLATE_INDEX_PATH) as f: + return f.read().format(branch=branch) def main(): diff --git a/documentation-generator/template-index.html b/documentation-generator/template-index.html new file mode 100644 index 00000000..42b28adb --- /dev/null +++ b/documentation-generator/template-index.html @@ -0,0 +1,8 @@ + + + + + + +Please follow this link.