diff --git a/doc/templates/conf.py.cn.in b/doc/templates/conf.py.cn.in
index 3ad6137c419bf979aef4d1adc0c7417014fbf6c4..32b2071385d9ae438be84dfab64dcaa46ac18880 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 aa021320a95baca1adb5dedb9f43426425437c67..a454e80c61cdf28b3d6cd86f1ba8a528eae7d3ee 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 47329c2a928d029e578f60ff9c9111d06c66b940..5091eb32eaeff77bd40f5d348e887b99b6eff4ea 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 %}