Skip to content

Commit

Permalink
PaddlePaddle.org requires the nav tree to be generated in order to pa…
Browse files Browse the repository at this point in the history
…rse the site map. Since we removed theme in #8752, this also removed the site navigation menu.  This changelist adds back the site navigation menu. (#8760)
  • Loading branch information
cs2be authored Mar 5, 2018
1 parent 19de160 commit 95a28d1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/templates/conf.py.cn.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions doc/templates/conf.py.en.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions doc/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
{# Import the theme's layout. #}
{% extends "!layout.html" %}

{# SIDE NAV, TOGGLES ON MOBILE #}
{% block menu %}
<nav class="doc-menu-vertical" role="navigation">
{% set toctree = toctree(maxdepth=-1, collapse=False,titles_only=True, includehidden=True) %}
{{ toctree }}
</nav>
{% endblock %}

{%- block extrahead %}
<script>
Expand Down

0 comments on commit 95a28d1

Please sign in to comment.