From 34f1b8802790607f45fdc6b733af23d5d0ef4510 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Wed, 28 Sep 2016 16:56:12 +0800 Subject: [PATCH] Add analystic scripts to documentation --- doc/conf.py.in | 4 ++-- doc/templates/layout.html | 16 ++++++++++++++++ doc_cn/conf.py.in | 4 +--- 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 doc/templates/layout.html diff --git a/doc/conf.py.in b/doc/conf.py.in index 8515042747..6c221f598b 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -23,6 +23,8 @@ AutoStructify = transform.AutoStructify # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, '@PROJ_ROOT@/python') +templates_path = ["@PROJ_ROOT@/doc/templates"] + # -- Doxygen Settings breathe_projects = { 'paddle': '@PADDLE_DOXYGEN_OUTPUT@/xml' @@ -66,8 +68,6 @@ extensions = [ autodoc_member_order = 'bysource' -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: diff --git a/doc/templates/layout.html b/doc/templates/layout.html new file mode 100644 index 0000000000..47329c2a92 --- /dev/null +++ b/doc/templates/layout.html @@ -0,0 +1,16 @@ +{# layout.html #} +{# Import the theme's layout. #} +{% extends "!layout.html" %} + + +{%- block extrahead %} + +{% endblock %} diff --git a/doc_cn/conf.py.in b/doc_cn/conf.py.in index e1c63cf9f1..391f7981ea 100644 --- a/doc_cn/conf.py.in +++ b/doc_cn/conf.py.in @@ -22,6 +22,7 @@ AutoStructify = transform.AutoStructify # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, '@PROJ_ROOT@/python') +templates_path = ["@PROJ_ROOT@/doc/templates"] # -- General configuration ------------------------------------------------ @@ -51,9 +52,6 @@ table_styling_embed_css = True autodoc_member_order = 'bysource' -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # source_suffix = ['.rst', '.md']