From 70c32787d63a7cb7eb48edce5d889c6ec8927c39 Mon Sep 17 00:00:00 2001 From: kaiyou Date: Sat, 4 Nov 2017 21:38:29 +0100 Subject: [PATCH] Insert a dynamic template for multiversion rendering --- docs/_templates/layout.html | 2 ++ docs/conf.py | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 docs/_templates/layout.html diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 00000000..3f424a0a --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,2 @@ +{% set version=github_version %} +{% extends "!layout.html" %} diff --git a/docs/conf.py b/docs/conf.py index 3399dc4d..37c70d5f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,7 +4,7 @@ extensions = ['sphinx.ext.imgmath', 'sphinx.ext.viewcode'] -templates_path = [] +templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'Mailu' @@ -27,3 +27,12 @@ html_sidebars = { 'searchbox.html', ] } + +# Theme options +html_context = { + 'display_github': True, + 'github_user': 'mailu', + 'github_repo': 'mailu', + 'github_version': 'master', + 'conf_py_path': '/docs/' +}