Skip to content

Comments

Update write docs cn#6014

Merged
luotao1 merged 6 commits intodevelopfrom
updateWriteDocsCN
Dec 5, 2017
Merged

Update write docs cn#6014
luotao1 merged 6 commits intodevelopfrom
updateWriteDocsCN

Conversation

@jetfuel
Copy link
Contributor

@jetfuel jetfuel commented Nov 29, 2017

Add dev/contribute_to_paddle_cn.md onto navigation link

Update the write_docs_en.rst and write_docs_cn.rst to include how to run the documentation viewer tool without Docker

Reference issue: #5959

Update the write_docs_en.rst and write_docs_cn.rst to include how to run the documentation viewer tool without Docker
Add dev/contribute_to_paddle_cn.md onto navigation link
.. toctree::
:maxdepth: 1

dev/build_cn.rst
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


使用PaddlePaddle.org工具
--------------
这个是目前推荐的使用方法。除了可以自动编役文档,也可以直接在网页预览文档。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

编役-》编译

python manage.py runserver

之后再用网页连到http://localhost:8000就可以在网页上生成需要的文档。
想了解更多关於 PaddlePaddle.org 工具,可以 `点击这里 <https://github.com/PaddlePaddle/PaddlePaddle.org/blob/develop/README.cn.md>`_ 。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

关於-》关于

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句中文有点不太通顺吧,改成想了解更多PaddlePaddle.org工具的详细信息

cd paddlepaddle
git clone [email protected]:PaddlePaddle/Paddle.git
git clone [email protected]:PaddlePaddle/book.git
git clone [email protected]:PaddlePaddle/models.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果用户只想修改一个repo下的内容,是不是下载一个repo就够了呢?还是目前不支持单独查看的功能呢

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • clone链接建议写https链接吧,这样用户不需要有github账号、也不需要配置sshkey就能直接clone。
  • 另外,这里漏掉了Mobile这个repo。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luotao1 對的,只要下載一個 repo 就夠。我擺上大部分的Repos 是希望用戶可以直接copy and paste 來開始

之后再用网页连到http://localhost:8000就可以在网页上生成需要的文档。
想了解更多关於 PaddlePaddle.org 工具,可以 `点击这里 <https://github.com/PaddlePaddle/PaddlePaddle.org/blob/develop/README.cn.md>`_ 。

使用Docker构建
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前:“使用Docker构建”和“直接构建”都是对paddle/doc下的所有文档(除了op文档,使用printer_operator_docs命令)进行构建,而且使用的是老的doc_theme,即按照这些命令跑出来的是http://doc.paddlepaddle.org/develop/doc/。
那么这两小节怎么处理呢?

  • 编译命令的话:可以后续在paddle_docs加上编译op文档的命令;
  • 但显示的话,怎么做呢?

也就是上面那个问题:如果用户只想修改一个repo下的内容,要怎么看呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

viewer tool 裡有選項,可以單獨編譯單一的 repo.

@@ -52,12 +90,12 @@ PaddlePaddle文档使用 `sphinx`_ 自动生成,用户可以参考sphinx教程

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如何更新文档主题:这一节可以删了,现在已经不使用doc_theme下的前端网页设计文件了。doc_theme文件夹后续也会删除。

@@ -8,7 +8,45 @@ PaddlePaddle的文档包括英文文档 ``doc`` 和中文文档 ``doc_cn`` 两
如何构建文档
Copy link
Contributor

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/目录下么

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,operator的文档也是放在doc/目录下

cd paddlepaddle
git clone [email protected]:PaddlePaddle/Paddle.git
git clone [email protected]:PaddlePaddle/book.git
git clone [email protected]:PaddlePaddle/models.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • clone链接建议写https链接吧,这样用户不需要有github账号、也不需要配置sshkey就能直接clone。
  • 另外,这里漏掉了Mobile这个repo。

git clone [email protected]:PaddlePaddle/book.git
git clone [email protected]:PaddlePaddle/models.git

docker run -it -p 8000:8000 paddlepaddle/paddlepaddle.org:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是docker run -it -p 8000:8000 -v $PWD:/var/content paddlepaddle/paddlepaddle.org:latest,不然本地的修改无法预览。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因為是在docker 與 文件 repo 是在同一個 parent folder, 所以可以修改文件。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档这里应该是有typo哦,没有-v $PWD:/var/content,我昨天试了很久,本地修改都没生效。后来去看了PaddlePaddle.org里面的README,才发现是因为没有用-v $PWD:/var/content映射本地文件。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Xreki 哇,感謝提出這一點。剛剛在跑了一次,也遇到一樣的問題。我更新了文件。現在應該是對的了

git clone [email protected]:PaddlePaddle/book.git
git clone [email protected]:PaddlePaddle/models.git
git clone [email protected]:PaddlePaddle/PaddlePaddle.org.git
export CONTENT_DIR=<path_to_paddlepaddle_working_directory>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该对CONTENT_DIR介绍一下,path_to_paddlepaddle_working_directory我也不知道应该是哪个路径

python manage.py runserver

之后再用网页连到http://localhost:8000就可以在网页上生成需要的文档。
想了解更多关於 PaddlePaddle.org 工具,可以 `点击这里 <https://github.com/PaddlePaddle/PaddlePaddle.org/blob/develop/README.cn.md>`_ 。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句中文有点不太通顺吧,改成想了解更多PaddlePaddle.org工具的详细信息

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 70ee79c into develop Dec 5, 2017
@luotao1 luotao1 deleted the updateWriteDocsCN branch December 8, 2017 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants