blob: 2cdfe1130c8bf938efd4c658c557fa96aca52a84 [file] [log] [blame]
nacl-docs-rst
=============
Directory structure
-------------------
This is a tree of .rst files that represent the source of the NaCl
documentation. Some of the files and directories here are special:
* conf.py: Sphinx configuration file
* images/: Images are stored here. Note that this isn't necessary - Sphinx
doesn't mind about interspersing images in .rst directories.
* _sphinxext/: Code of the Sphinx extension we use to generate HTML from .rst
* _static/: Static files, like CSS, for the documentation. This should be seen
as part of the infrastructure - the real CSS comes from the real doc
publishing server.
* doxygen/: Contains scripts for building doxygen docs.
* Makefile & README
All output is written to native_client_sdk/doc_generated/...
How to build
------------
To build the docs you will need these debian/ubuntu packages:
* python-sphinx
* python-beautifulsoup
There are two primary make targets: ``chromesite`` and ``chromesite_rst``. The
``chromesite`` target will build all documentation, including the doxygen docs.
This usually takes about a minute. To build this config, run::
make
The ``chromesite_rst`` target will only build the ReST docs. This is usually
much faster. The default target is ``chromesite``. To build this config, run::
make chromesite_rst
Local HTTP server to view the docs
----------------------------------
To view the HTML locally, build the docs with production mode turned off, and
run::
make serve
This will start a webserver on the local machine, and allows the pages
to be viewed by in a browser by navigating to::
http://localhost:8000/native-client
Serving through a server and not just file:/// because this way the <link>
relative paths to CSS actually work.
Checking outgoing links for integrity
-------------------------------------
We use the Sphinx-provided link checker (configured in conf.py and with some
monkey-patching in the extension) to check the outgoing links from the
documentation. To run the link checker::
make linkcheck
And look for "broken" in the output file.