From 95a28d13267ac612aa187aa228f2cc8e708f15cb Mon Sep 17 00:00:00 2001 From: Thuan Nguyen Date: Mon, 5 Mar 2018 13:06:26 -0800 Subject: [PATCH] PaddlePaddle.org requires the nav tree to be generated in order to parse the site map. Since we removed theme in https://github.com/PaddlePaddle/Paddle/pull/8752, this also removed the site navigation menu. This changelist adds back the site navigation menu. (#8760) --- doc/templates/conf.py.cn.in | 5 +++++ doc/templates/conf.py.en.in | 5 +++++ doc/templates/layout.html | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/doc/templates/conf.py.cn.in b/doc/templates/conf.py.cn.in index 3ad6137c4..32b207138 100644 --- a/doc/templates/conf.py.cn.in +++ b/doc/templates/conf.py.cn.in @@ -22,6 +22,11 @@ import paddle.v2 MarkdownParser = parser.CommonMarkParser AutoStructify = transform.AutoStructify +# If extensions (or modules to document with autodoc) are in another directory, +# 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. +templates_path = ["@PADDLE_SOURCE_DIR@/doc/templates"] + # -- General configuration ------------------------------------------------ # General information about the project. diff --git a/doc/templates/conf.py.en.in b/doc/templates/conf.py.en.in index aa021320a..a454e80c6 100644 --- a/doc/templates/conf.py.en.in +++ b/doc/templates/conf.py.en.in @@ -23,6 +23,11 @@ import paddle.v2 MarkdownParser = parser.CommonMarkParser AutoStructify = transform.AutoStructify +# If extensions (or modules to document with autodoc) are in another directory, +# 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. +templates_path = ["@PADDLE_SOURCE_DIR@/doc/templates"] + # -- General configuration ------------------------------------------------ # General information about the project. diff --git a/doc/templates/layout.html b/doc/templates/layout.html index 47329c2a9..5091eb32e 100644 --- a/doc/templates/layout.html +++ b/doc/templates/layout.html @@ -2,6 +2,13 @@ {# Import the theme's layout. #} {% extends "!layout.html" %} +{# SIDE NAV, TOGGLES ON MOBILE #} +{% block menu %} + +{% endblock %} {%- block extrahead %}