diff --git a/doc/howto/dev/write_docs_cn.rst b/doc/howto/dev/write_docs_cn.rst index 25a967da8394cf9ab8753033bf6497d8a8944e7f..6e4e27dd00edce2497ba0c11f5c44f284855fa31 100644 --- a/doc/howto/dev/write_docs_cn.rst +++ b/doc/howto/dev/write_docs_cn.rst @@ -29,6 +29,25 @@ PaddlePaddle的文档构建有三种方式。 之后再用网页连到http://localhost:8000就可以在网页上生成需要的文档 +如果不想使用 Docker,你还可以通过运行Django框架直接激活工具的服务器。使用下面的命令来运行它。 + +.. code-block:: bash + + mkdir paddlepaddle + 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= + export ENV='' + cd PaddlePaddle.org/portal/ + pip install -r requirements.txt + python manage.py runserver + +之后再用网页连到http://localhost:8000就可以在网页上生成需要的文档。 +想了解更多关於 PaddlePaddle.org 工具,可以 `点击这里 `_ 。 + 使用Docker构建 -------------- @@ -71,12 +90,12 @@ PaddlePaddle文档使用 `sphinx`_ 自动生成,用户可以参考sphinx教程 PaddlePaddle文档主题在 `TO_YOUR_PADDLE_CLONE_PATH/doc_theme` 文件夹下,包含所有和前端网页设计相关的文件。 -如何更新doc.paddlepaddle.org +如何更新www.paddlepaddle.org ============================ -更新的文档以PR的形式提交到github中,提交方式参见 `贡献文档 `_ 。 -目前PaddlePaddle的develop分支的文档是自动触发更新的,用户可以分别查看最新的 `中文文档 `_ 和 -`英文文档 `_ 。 +更新的文档以PR的形式提交到github中,提交方式参见 `贡献文档 `_ 。 +目前PaddlePaddle的develop分支的文档是自动触发更新的,用户可以分别查看最新的 `中文文档 `_ 和 +`英文文档 `_ 。 .. _cmake: https://cmake.org/ diff --git a/doc/howto/dev/write_docs_en.rst b/doc/howto/dev/write_docs_en.rst new file mode 100644 index 0000000000000000000000000000000000000000..0e60e218897f5638d7a10d47385b72098f182701 --- /dev/null +++ b/doc/howto/dev/write_docs_en.rst @@ -0,0 +1,65 @@ +################## +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. + +How to Build Documentations +============ + +We recommend using PaddlePaddle.org tool to build documentation + + +Use PaddlePaddle.org tool +-------------- +This is the recommended method to build documentation. It can compile documentation and preview the documentation in a web browser. + +The tool uses Docker, please install it on your system. Please check Docker official website on how to install Docker. You may use the following commands to activate the tool + +.. code-block:: bash + + mkdir paddlepaddle + 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 + + 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 + +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 + 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= + export ENV='' + cd PaddlePaddle.org/portal/ + pip install -r requirements.txt + python manage.py runserver + +Use a web browser and navigate to http://localhost:8000, click the buttons to compile the documentation +If you want to learn more on the PaddlePaddle.org, please `click here `_ 。 + +How to write Documentations +============ + +PaddlePaddle uses `sphinx`_ to compile documentations,Please check sphinx official website for more detail. + + +How to update www.paddlepaddle.org +============================ + +Please create PRs and submit them to github, please check `Contribute Code `_ 。 +PaddlePaddle develop branch will update the documentation once the PR is merged. User may check latest `Chinese Docs `_ and +`English Docs `_ 。 + +.. _cmake: https://cmake.org/ +.. _sphinx: http://www.sphinx-doc.org/en/1.4.8/ diff --git a/doc/howto/index_cn.rst b/doc/howto/index_cn.rst index 76d3e0a0092f89005605a23e14e712530112a5ac..8ea99ea40caab62ad1c384c4cb036ec2ccd624e9 100644 --- a/doc/howto/index_cn.rst +++ b/doc/howto/index_cn.rst @@ -20,6 +20,7 @@ :maxdepth: 1 dev/build_cn.rst + dev/contribute_to_paddle_cn.md dev/write_docs_cn.rst 模型配置 diff --git a/doc/howto/index_en.rst b/doc/howto/index_en.rst index 1b6034be4edffd2cbc822018b733b9a3836ea84a..fbf0d2d3ae7597b87d014a746be540b067798a44 100644 --- a/doc/howto/index_en.rst +++ b/doc/howto/index_en.rst @@ -21,6 +21,7 @@ Development dev/build_en.rst dev/new_layer_en.rst dev/contribute_to_paddle_en.md + dev/write_docs_en.rst Configuration -------------