diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 58ce5d61c950d12630cfe1de354ffc2a2ba1fd59..cdd8de78cef63e14274db368755bbba44e8fb845 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,51 +1,2 @@ -if(NOT DEFINED SPHINX_THEME) - set(SPHINX_THEME default) -endif() - -if(NOT DEFINED SPHINX_THEME_DIR) - set(SPHINX_THEME_DIR) -endif() - -# configured documentation tools and intermediate build results -set(BINARY_BUILD_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_build") - -# Sphinx cache with pickled ReST documents -set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees") - -# HTML output director -set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html") - -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/templates/conf.py.en.in" - "${BINARY_BUILD_DIR_EN}/conf.py" - @ONLY) - -sphinx_add_target(paddle_docs - html - ${BINARY_BUILD_DIR_EN} - ${SPHINX_CACHE_DIR_EN} - ${CMAKE_CURRENT_SOURCE_DIR} - ${SPHINX_HTML_DIR_EN}) - -# configured documentation tools and intermediate build results -set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build") - -# Sphinx cache with pickled ReST documents -set(SPHINX_CACHE_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_doctrees") - -# HTML output directory -set(SPHINX_HTML_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/html") - -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/templates/conf.py.cn.in" - "${BINARY_BUILD_DIR_CN}/conf.py" - @ONLY) - -sphinx_add_target(paddle_docs_cn - html - ${BINARY_BUILD_DIR_CN} - ${SPHINX_CACHE_DIR_CN} - ${CMAKE_CURRENT_SOURCE_DIR} - ${SPHINX_HTML_DIR_CN}) - add_subdirectory(api) +add_subdirectory(v2) diff --git a/doc/dev/contribute_to_paddle_en.md b/doc/dev/contribute_to_paddle_en.md deleted file mode 120000 index f939e75f21a8badb5c40f527abd0e098fe9bc472..0000000000000000000000000000000000000000 --- a/doc/dev/contribute_to_paddle_en.md +++ /dev/null @@ -1 +0,0 @@ -../../CONTRIBUTING.md \ No newline at end of file diff --git a/doc/dev/new_op_cn.md b/doc/fluid/dev/new_op_cn.md similarity index 100% rename from doc/dev/new_op_cn.md rename to doc/fluid/dev/new_op_cn.md diff --git a/doc/dev/new_op_en.md b/doc/fluid/dev/new_op_en.md similarity index 100% rename from doc/dev/new_op_en.md rename to doc/fluid/dev/new_op_en.md diff --git a/doc/dev/new_op_kernel_en.md b/doc/fluid/dev/new_op_kernel_en.md similarity index 100% rename from doc/dev/new_op_kernel_en.md rename to doc/fluid/dev/new_op_kernel_en.md diff --git a/doc/dev/use_eigen_cn.md b/doc/fluid/dev/use_eigen_cn.md similarity index 100% rename from doc/dev/use_eigen_cn.md rename to doc/fluid/dev/use_eigen_cn.md diff --git a/doc/dev/use_eigen_en.md b/doc/fluid/dev/use_eigen_en.md similarity index 100% rename from doc/dev/use_eigen_en.md rename to doc/fluid/dev/use_eigen_en.md diff --git a/doc/howto/cluster/fluid_cluster_train_en.md b/doc/fluid/howto/cluster/fluid_cluster_train_en.md similarity index 100% rename from doc/howto/cluster/fluid_cluster_train_en.md rename to doc/fluid/howto/cluster/fluid_cluster_train_en.md diff --git a/doc/howto/optimization/cpu_profiling_cn.md b/doc/fluid/howto/optimization/cpu_profiling_cn.md similarity index 100% rename from doc/howto/optimization/cpu_profiling_cn.md rename to doc/fluid/howto/optimization/cpu_profiling_cn.md diff --git a/doc/howto/optimization/cpu_profiling_en.md b/doc/fluid/howto/optimization/cpu_profiling_en.md similarity index 100% rename from doc/howto/optimization/cpu_profiling_en.md rename to doc/fluid/howto/optimization/cpu_profiling_en.md diff --git a/doc/howto/read_source.md b/doc/fluid/read_source.md similarity index 100% rename from doc/howto/read_source.md rename to doc/fluid/read_source.md diff --git a/doc/templates/conf.py.cn.in b/doc/templates/conf.py.cn.in index d134aad794b0a630dfc8395c484d111bc5462d9b..260b6c9fd1b364433cae098bacea77aa7fe9e266 100644 --- a/doc/templates/conf.py.cn.in +++ b/doc/templates/conf.py.cn.in @@ -21,10 +21,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_theme/templates"] +templates_path = ["@PADDLE_SOURCE_DIR@/doc/templates"] # -- General configuration ------------------------------------------------ @@ -120,7 +121,7 @@ html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['@PADDLE_SOURCE_DIR@/doc_theme/static'] +#html_static_path = [] # Output file base name for HTML help builder. htmlhelp_basename = project + 'doc' diff --git a/doc/templates/conf.py.en.in b/doc/templates/conf.py.en.in index 1f057d2e839896722fedba6634607bcdf2fd893a..e5757b86b43001bc6090d8edd0aaa5ff4fc476ee 100644 --- a/doc/templates/conf.py.en.in +++ b/doc/templates/conf.py.en.in @@ -22,10 +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_theme/templates"] +templates_path = ["@PADDLE_SOURCE_DIR@/doc/templates"] # -- General configuration ------------------------------------------------ @@ -120,7 +121,7 @@ html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['@PADDLE_SOURCE_DIR@/doc_theme/static'] +#html_static_path = [] # Output file base name for HTML help builder. htmlhelp_basename = project + 'doc' 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 %} - - {% endblock %} - - {# Keep modernizr in head - http://modernizr.com/docs/#installing #} - - - - -
- - {% block extrabody %} -