diff --git a/README.md b/README.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e744e193bd198d3f6f6b001f0a906c580173cd38 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,57 @@ +# Fluid Documentation Skeleton + +## Build + +To build documentation, you need have a linux machine and have python2, virtualenv, gmake installed. + +### Preparation + +You need to create a `virtualenv` instead of polute the global python library path + +```bash +virtualenv .env +``` + +You can enter virtualenv by + +```bash +source .env/bin/activate +``` + +You can exit virtualenv by + +```bash +deactivate +``` + +### Install dependencies + +```bash +# enter virtualenv +source .env/bin/activate +# install dependencies +pip install -r requirements.txt +``` + +### Make HTML + +```bash +# make clean # make clean to regenerate toctree. Just `make html` may have a cache. +make html +``` +and the html files will be generated to `build/html`. You can open `build/html/index.html` with your browser to see the documentation. + +## Edit + +### Edit documentation + +It is suggested to use `reStructuredText` because it is the only official markup language supportted by our documentation generating system, sphinx. `markdown` can also be used. However, since the `markdown` has so many dialects, there is no guarantee that the `markdown` source file can be rendered well. + +The `reStructuredText` cheatsheet is [here](http://docutils.sourceforge.net/docs/user/rst/quickref.html). + + +### Edit structure + +The `sphinx` (our documentation generating system) uses `toctree` to organize documentation. `toctree` means `table of content tree`. + +Please see the [sphinx documentation](http://www.sphinx-doc.org/en/master/), especially [`toctree` directives](http://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html) diff --git a/source/conf.py b/source/conf.py index b4e6426d54ccd0d4a5a1395b4e7b2b1d1116460d..8dccb0bb23ec07939eb67c68074f71c138b416e3 100644 --- a/source/conf.py +++ b/source/conf.py @@ -17,6 +17,7 @@ import os import shlex from recommonmark.parser import CommonMarkParser from recommonmark.transform import AutoStructify +import paddle.fluid # 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