From 33fe7415c7070494f347cf9ba75c878ecffeeb52 Mon Sep 17 00:00:00 2001 From: "Wang,Jeff" Date: Mon, 4 Dec 2017 12:09:41 -0800 Subject: [PATCH] Provide more details on the CONTENT_DIR. Change the instructions to use https instead of SSH --- doc/howto/dev/write_docs_cn.rst | 43 +++++++++++++++++++-------------- doc/howto/dev/write_docs_en.rst | 31 +++++++++++++++++------- doc/howto/index_cn.rst | 1 - 3 files changed, 47 insertions(+), 28 deletions(-) diff --git a/doc/howto/dev/write_docs_cn.rst b/doc/howto/dev/write_docs_cn.rst index 3dddbbe506..b19918a5f8 100644 --- a/doc/howto/dev/write_docs_cn.rst +++ b/doc/howto/dev/write_docs_cn.rst @@ -3,7 +3,7 @@ ################## PaddlePaddle的文档包括英文文档 ``doc`` 和中文文档 ``doc_cn`` 两个部分。文档都是通过 `cmake`_ 驱动 `sphinx`_ 编译生成,生成后的文档分别存储在编译目录的 ``doc`` 和 ``doc_cn`` 两个子目录下。 - +也可以利用PaddlePaddle 工具来编译文档,这个情况下所有的文件会存在整理过的的文件目录 .ppo_workspace/content 下 如何构建文档 ============ @@ -13,40 +13,52 @@ PaddlePaddle的文档构建有三种方式。 使用PaddlePaddle.org工具 -------------- -这个是目前推荐的使用方法。除了可以自动编役文档,也可以直接在网页预览文档。 +这个是目前推荐的使用方法。除了可以自动编译文档,也可以直接在网页预览文档。 文件工具是使用Docker,需要在系统里先安装好Docker工具包。Docker安装请参考Docker的官网。安装好Docker之后及可用以下命令启动工具 .. code-block:: bash - mkdir paddlepaddle + mkdir paddlepaddle # Create paddlepaddle working directory cd paddlepaddle - git clone git@github.com:PaddlePaddle/Paddle.git - git clone git@github.com:PaddlePaddle/book.git - git clone git@github.com:PaddlePaddle/models.git + + # Clone the content repositories + git clone https://github.com/PaddlePaddle/Paddle.git + git clone https://github.com/PaddlePaddle/book.git + git clone https://github.com/PaddlePaddle/models.git + git clone https://github.com/PaddlePaddle/Mobile.git docker run -it -p 8000:8000 paddlepaddle/paddlepaddle.org:latest 之后再用网页连到http://localhost:8000就可以在网页上生成需要的文档 +编译后的文件将被存储在工作目录 /.ppo_workspace/content。 如果不想使用 Docker,你还可以通过运行Django框架直接激活工具的服务器。使用下面的命令来运行它。 .. code-block:: bash - mkdir paddlepaddle + mkdir paddlepaddle # Create paddlepaddle working directory cd paddlepaddle - git clone git@github.com:PaddlePaddle/Paddle.git - git clone git@github.com:PaddlePaddle/book.git - git clone git@github.com:PaddlePaddle/models.git - git clone git@github.com:PaddlePaddle/PaddlePaddle.org.git - export CONTENT_DIR= + + # Clone the content repositories and PaddlePaddle.org + git clone https://github.com/PaddlePaddle/Paddle.git + git clone https://github.com/PaddlePaddle/book.git + git clone https://github.com/PaddlePaddle/models.git + git clone https://github.com/PaddlePaddle/Mobile.git + git clone https://github.com/PaddlePaddle/PaddlePaddle.org.git + + # Please specify the PaddlePaddle working directory. In the current setting, it should be pwd + export CONTENT_DIR= export ENV='' cd PaddlePaddle.org/portal/ pip install -r requirements.txt python manage.py runserver +工具服务器将读取环境变量 CONTENT_DIR 搜索代码库。请指定的PaddlePaddle工作目录给环境变量 CONTENT_DIR。 之后再用网页连到http://localhost:8000就可以在网页上生成需要的文档。 -想了解更多关於 PaddlePaddle.org 工具,可以 `点击这里 `_ 。 +编译后的文件将被存储在工作目录 /.ppo_workspace/content。 + +想了解更多PaddlePaddle.org工具的详细信息,可以 `点击这里 `_ 。 使用Docker构建 -------------- @@ -85,11 +97,6 @@ PaddlePaddle的文档构建有三种方式。 PaddlePaddle文档使用 `sphinx`_ 自动生成,用户可以参考sphinx教程进行书写。 -如何更新文档主题 -================ - -PaddlePaddle文档主题在 `TO_YOUR_PADDLE_CLONE_PATH/doc_theme` 文件夹下,包含所有和前端网页设计相关的文件。 - 如何更新www.paddlepaddle.org ============================ diff --git a/doc/howto/dev/write_docs_en.rst b/doc/howto/dev/write_docs_en.rst index 0e60e21889..ed37737517 100644 --- a/doc/howto/dev/write_docs_en.rst +++ b/doc/howto/dev/write_docs_en.rst @@ -4,6 +4,7 @@ Contribute Documentation PaddlePaddle supports English documentation ``doc`` and Chinese documentation ``doc_cn``. Both are compiled by `cmake`_ and `sphinx`_ , the compiled documentations will be stored under ``doc`` and ``doc_cn`` directories. +When using the PaddlePaddle.org to compile documentations, the compiled documentations will be stored under a consolidated directory: .ppo_workspace/content How to Build Documentations ============ @@ -19,26 +20,36 @@ The tool uses Docker, please install it on your system. Please check Docker offi .. code-block:: bash - mkdir paddlepaddle + mkdir paddlepaddle # Create paddlepaddle working directory cd paddlepaddle - git clone git@github.com:PaddlePaddle/Paddle.git - git clone git@github.com:PaddlePaddle/book.git - git clone git@github.com:PaddlePaddle/models.git + + # Clone the content repositories. You may only clone the contents you need + git clone https://github.com/PaddlePaddle/Paddle.git + git clone https://github.com/PaddlePaddle/book.git + git clone https://github.com/PaddlePaddle/models.git + git clone https://github.com/PaddlePaddle/Mobile.git docker run -it -p 8000:8000 paddlepaddle/paddlepaddle.org:latest Use a web browser and navigate to http://localhost:8000, click the buttons to compile the documentation +The compiled documentations will be stored in /.ppo_workspace/content + If you don't wish to use Docker, you can also activate the tool through Django. Use the following the commands to set up .. code-block:: bash - mkdir paddlepaddle + mkdir paddlepaddle # Create paddlepaddle working directory cd paddlepaddle - git clone git@github.com:PaddlePaddle/Paddle.git - git clone git@github.com:PaddlePaddle/book.git - git clone git@github.com:PaddlePaddle/models.git - git clone git@github.com:PaddlePaddle/PaddlePaddle.org.git + + # Clone the content repositories and PaddlePaddle.org + git clone https://github.com/PaddlePaddle/Paddle.git + git clone https://github.com/PaddlePaddle/book.git + git clone https://github.com/PaddlePaddle/models.git + git clone https://github.com/PaddlePaddle/Mobile.git + git clone https://github.com/PaddlePaddle/PaddlePaddle.org.git + + # Please specify the PaddlePaddle working directory. In the current setting, it should be pwd export CONTENT_DIR= export ENV='' cd PaddlePaddle.org/portal/ @@ -46,6 +57,8 @@ If you don't wish to use Docker, you can also activate the tool through Django. python manage.py runserver Use a web browser and navigate to http://localhost:8000, click the buttons to compile the documentation +The compiled documentations will be stored in /.ppo_workspace/content + If you want to learn more on the PaddlePaddle.org, please `click here `_ 。 How to write Documentations diff --git a/doc/howto/index_cn.rst b/doc/howto/index_cn.rst index 8ea99ea40c..991b9e2596 100644 --- a/doc/howto/index_cn.rst +++ b/doc/howto/index_cn.rst @@ -19,7 +19,6 @@ .. toctree:: :maxdepth: 1 - dev/build_cn.rst dev/contribute_to_paddle_cn.md dev/write_docs_cn.rst -- GitLab