From 3138d723091234a3534baa8b1bbaad31df6fb8d6 Mon Sep 17 00:00:00 2001 From: jdenisco Date: Mon, 24 Sep 2018 14:59:33 -0400 Subject: Add the sphinx docs build options Change-Id: If7ac5b41ca4ac602a100b616b37d07f658fd6a90 Signed-off-by: jdenisco --- docs/gettingstarted/writingdocs/buildingrst.rst | 20 ++++++++++++-------- docs/scripts/sphinx-make.sh | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100755 docs/scripts/sphinx-make.sh (limited to 'docs') diff --git a/docs/gettingstarted/writingdocs/buildingrst.rst b/docs/gettingstarted/writingdocs/buildingrst.rst index 5134bb395ee..46830ca2580 100644 --- a/docs/gettingstarted/writingdocs/buildingrst.rst +++ b/docs/gettingstarted/writingdocs/buildingrst.rst @@ -32,11 +32,7 @@ In the vpp root directory on your system, run: .. code-block:: console - $ python -m pip install --user virtualenv - $ python -m virtualenv env - $ source env/bin/activate - $ pip install -r docs/etc/requirements.txt - $ cd docs + $ make docs-venv Which installs all the required applications into it's own, isolated, virtual environment, so as to not interfere with other builds that may use different versions of software. @@ -44,12 +40,20 @@ interfere with other builds that may use different versions of software. Build the html files ====================== -Be sure you are in your vpp-docs/docs directory, since that is where Sphinx will look for your **conf.py** -file, and build the **.rst** files into an **index.html** file: +Build the html **index.html** file: .. code-block:: console - $ make html + $ make docs + +Clean the environment +====================== + +Delete all the generated files with the following: + +.. code-block:: console + + $ make docs-clean View the results ================= diff --git a/docs/scripts/sphinx-make.sh b/docs/scripts/sphinx-make.sh new file mode 100755 index 00000000000..e95b3eba066 --- /dev/null +++ b/docs/scripts/sphinx-make.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ "$1" == "venv" ] +then + python -m pip install --user virtualenv + python -m virtualenv $VENV_DIR + source $VENV_DIR/bin/activate; + pip install -r $DOCS_DIR/etc/requirements.txt +else + source $VENV_DIR/bin/activate; + make -C $DOCS_DIR $1 +fi + +deactivate -- cgit 1.2.3-korg