You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-23 22:04:47 +02:00
Use a template to replace the version tag
This commit is contained in:
19
docs/conf.py
19
docs/conf.py
@@ -2,10 +2,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
import os, sys, docutils
|
||||
|
||||
sys.path.append(os.path.dirname(__file__))
|
||||
extensions = ['sphinx.ext.imgmath', 'sphinx.ext.viewcode', 'conf']
|
||||
extensions = ['sphinx.ext.imgmath', 'sphinx.ext.viewcode']
|
||||
templates_path = ['_templates']
|
||||
source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
@@ -40,20 +37,6 @@ html_context = {
|
||||
}
|
||||
|
||||
|
||||
def setup(app):
|
||||
""" The conf itself is an extension for parsing rst.
|
||||
"""
|
||||
def rstjinja(app, docname, source):
|
||||
""" Render our pages as a jinja template for fancy templating.
|
||||
"""
|
||||
if app.builder.format != 'html':
|
||||
return
|
||||
source[0] = app.builder.templates.render_string(
|
||||
source[0], app.config.html_context)
|
||||
|
||||
app.connect("source-read", rstjinja)
|
||||
|
||||
|
||||
# Upload function when the script is called directly
|
||||
if __name__ == "__main__":
|
||||
import os, sys, paramiko
|
||||
|
||||
Reference in New Issue
Block a user