Skip to content

Commit 44d4be6

Browse files
authored
Merge pull request #724 from Shi-Liang/theme_develop
Customized Paddle's document theme
2 parents 8f70b66 + 52e3937 commit 44d4be6

File tree

10 files changed

+1232
-9
lines changed

10 files changed

+1232
-9
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ before_install:
5050
fi
5151
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
5252
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
53-
- pip install wheel protobuf sphinx breathe recommonmark virtualenv numpy
53+
- pip install wheel protobuf sphinx breathe recommonmark virtualenv numpy sphinx_rtd_theme
5454
script:
5555
- paddle/scripts/travis/main.sh
5656
notifications:

doc/conf.py.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ AutoStructify = transform.AutoStructify
2323
# documentation root, use os.path.abspath to make it absolute, like shown here.
2424
sys.path.insert(0, '@PROJ_ROOT@/python')
2525

26-
templates_path = ["@PROJ_ROOT@/doc/templates"]
26+
templates_path = ["@PROJ_ROOT@/doc_theme/templates"]
2727

2828
# -- General configuration ------------------------------------------------
2929

@@ -113,13 +113,12 @@ todo_include_todos = False
113113

114114
# The theme to use for HTML and HTML Help pages. See the documentation for
115115
# a list of builtin themes.
116-
#html_theme = 'sphinx_rtd_theme'
117-
html_theme = 'classic'
116+
html_theme = 'sphinx_rtd_theme'
118117

119118
# Add any paths that contain custom static files (such as style sheets) here,
120119
# relative to this directory. They are copied after the builtin static files,
121120
# so a file named "default.css" will overwrite the builtin "default.css".
122-
html_static_path = ['_static']
121+
html_static_path = ['@PROJ_ROOT@/doc_theme/static']
123122

124123
# Output file base name for HTML help builder.
125124
htmlhelp_basename = project + 'doc'

doc_cn/conf.py.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ AutoStructify = transform.AutoStructify
2222
# add these directories to sys.path here. If the directory is relative to the
2323
# documentation root, use os.path.abspath to make it absolute, like shown here.
2424
sys.path.insert(0, '@PROJ_ROOT@/python')
25-
templates_path = ["@PROJ_ROOT@/doc/templates"]
25+
templates_path = ["@PROJ_ROOT@/doc_theme/templates"]
2626

2727
# -- General configuration ------------------------------------------------
2828

@@ -112,12 +112,12 @@ todo_include_todos = False
112112

113113
# The theme to use for HTML and HTML Help pages. See the documentation for
114114
# a list of builtin themes.
115-
#html_theme = 'sphinx_rtd_theme' # sphinx_rtd_theme will cause table bad style
116-
html_theme = 'classic'
115+
html_theme = 'sphinx_rtd_theme'
116+
117117
# Add any paths that contain custom static files (such as style sheets) here,
118118
# relative to this directory. They are copied after the builtin static files,
119119
# so a file named "default.css" will overwrite the builtin "default.css".
120-
html_static_path = ['_static']
120+
html_static_path = ['@PROJ_ROOT@/doc_theme/static']
121121

122122
# Output file base name for HTML help builder.
123123
htmlhelp_basename = project + 'doc'

0 commit comments

Comments
 (0)