Bug 1421241 - Docs: Improve livehtml mode and recommend it

* Removes the unnecessary initial `make html`, since sphinx-autobuild
performs the initial build itself.
* Enables `--poll` watch mode, since file change detection otherwise
doesn't work in Vagrant.
* Updates the docs to recommend the livereload web server over the
one-off build when working on docs locally.
This commit is contained in:
Ed Morley 2017-11-28 14:39:09 +00:00
Родитель 607007d7e8
Коммит 194e3e3be5
2 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -24,5 +24,4 @@ html:
@echo "Build finished. The HTML pages are in $(BUILDDIR)." @echo "Build finished. The HTML pages are in $(BUILDDIR)."
livehtml: livehtml:
make html sphinx-autobuild -b html --poll $(SPHINXOPTS) $(BUILDDIR)
sphinx-autobuild -b html $(SPHINXOPTS) $(BUILDDIR)

Просмотреть файл

@ -95,15 +95,15 @@ Building the docs locally
------------------------- -------------------------
* Either ``vagrant ssh`` into the VM, or else activate a virtualenv on the host machine. * Either ``vagrant ssh`` into the VM, or else activate a virtualenv on the host machine.
* From the root of the Treeherder repo, run: * From the root of the Treeherder repo, run:
.. code-block:: bash .. code-block:: bash
> pip install -r requirements/docs.txt > pip install -r requirements/docs.txt
> make -C docs html > make -C docs livehtml
* The built docs can then be found inside ``docs/_build/``. * Visit http://127.0.0.1:8000 to view the docs.
* Source changes will result in automatic rebuilds and browser page reload.
Sharing UI-only changes with others using GitHub Pages Sharing UI-only changes with others using GitHub Pages