-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Update write docs cn #6014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update write docs cn #6014
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ed4810e
update the write_docs_cn.rst to include using paddlepaddle.org viewer…
jetfuel 2488b81
Add write_docs_en.rst for English version
jetfuel 048cc30
Merge branch 'develop' into updateWriteDocsCN
jetfuel 33fe741
Provide more details on the CONTENT_DIR.
jetfuel a061a85
Merge branch 'develop' into updateWriteDocsCN
jetfuel 576c41b
Update the incorrect docker commands. Should always specify -v flag.
jetfuel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
################## | ||
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 | ||
============ | ||
|
||
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 # Create paddlepaddle working directory | ||
cd paddlepaddle | ||
|
||
# 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 | ||
|
||
# Please specify the working directory through -v | ||
docker run -it -p 8000:8000 -v `pwd`:/var/content paddlepaddle/paddlepaddle.org:latest | ||
|
||
Note: PaddlePaddle.org will read the content repos specified in the -v (volume) flag of the docker run command | ||
Use a web browser and navigate to http://localhost:8000, click the buttons to compile the documentation | ||
The compiled documentations will be stored in <paddlepaddle working directory>/.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 # Create paddlepaddle working directory | ||
cd paddlepaddle | ||
|
||
# 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=<path_to_paddlepaddle_working_directory> | ||
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 | ||
The compiled documentations will be stored in <paddlepaddle working directory>/.ppo_workspace/content | ||
|
||
If you want to learn more on the PaddlePaddle.org, please `click here <https://github.com/PaddlePaddle/PaddlePaddle.org/blob/develop/README.md>`_ 。 | ||
|
||
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 <http://www.paddlepaddle.org/docs/develop/documentation/en/howto/dev/contribute_to_paddle_en.html>`_ 。 | ||
PaddlePaddle develop branch will update the documentation once the PR is merged. User may check latest `Chinese Docs <http://www.paddlepaddle.org/docs/develop/documentation/zh/getstarted/index_cn.html>`_ and | ||
`English Docs <http://www.paddlepaddle.org/docs/develop/documentation/en/getstarted/index_en.html>`_ 。 | ||
|
||
.. _cmake: https://cmake.org/ | ||
.. _sphinx: http://www.sphinx-doc.org/en/1.4.8/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
dev/contribute_to_paddle_cn.md | ||
dev/write_docs_cn.rst | ||
|
||
模型配置 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如何贡献/修改文档:
目前的文档包括:paddlepaddle/doc, book, models。第5行表述的只是paddlepaddle/doc。所以第5行是否要更新下?
此外:operator的文档也是放在doc/目录下么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,operator的文档也是放在doc/目录下