From 7cca23f657f878851ff7297ed5024cde71925597 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sat, 16 Jul 2016 18:30:16 +0200 Subject: [PATCH 1/2] Added docker image to easier build documentation --- Dockerfile | 18 ++++++++++++++++++ development/documentation.rst | 33 +++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a477b31 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM debian:latest + +# Credit goes to https://github.com/headstar/sphinx-doc-docker + +RUN apt-get update + +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y texlive texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y enchant +RUN apt-get update --fix-missing +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git + +RUN pip install Sphinx==1.4 +RUN pip install sphinx_rtd_theme +RUN pip install alabaster +RUN pip install sphinx_bootstrap_theme + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/development/documentation.rst b/development/documentation.rst index 8dfc454..3919c1c 100644 --- a/development/documentation.rst +++ b/development/documentation.rst @@ -1,8 +1,33 @@ Building the Documentation --------------------------- +========================== -First `install Sphinx`_ and `install enchant`_ (e.g. ``sudo apt-get install enchant``), -then download the requirements: +We build the documentation with Sphinx. You could install it on your system or use Docker. + +Install Sphinx +-------------- + +Install on local machine +~~~~~~~~~~~~~~~~~~~~~~~~ + +The installation for Sphinx differs between system. See `Sphinx installation page`_ for details. When Sphinx is +installed you need to `install enchant`_ (e.g. ``sudo apt-get install enchant``). + +Using Docker +~~~~~~~~~~~~ + +If you are using docker. Run the following commands from the repository root. + +.. code-block:: bash + + $ docker build -t sphinx-doc . + $ docker run -i -t -v /absolute/path/to/repo/root:/doc sphinx-doc + $ # You are now in the docker image + $ cd doc + +Build documentation +------------------- + +Before we can build the documentation we have to make sure to install all requirements. .. code-block:: bash @@ -15,6 +40,6 @@ To build the docs: $ make html $ make spelling -.. _install Sphinx: http://sphinx-doc.org/latest/install.html +.. _Sphinx installation page: http://sphinx-doc.org/latest/install.html .. _install enchant: http://www.abisource.com/projects/enchant/ From 9d57b7f625f216e24edbf5f26d7da44fa57ae9ab Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 18 Jul 2016 18:32:46 +0200 Subject: [PATCH 2/2] Minor fixes --- Dockerfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index a477b31..43cb065 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,17 +2,17 @@ FROM debian:latest # Credit goes to https://github.com/headstar/sphinx-doc-docker -RUN apt-get update +RUN apt-get update -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y texlive texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y enchant -RUN apt-get update --fix-missing -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y texlive texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y enchant +RUN apt-get update --fix-missing +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git -RUN pip install Sphinx==1.4 -RUN pip install sphinx_rtd_theme -RUN pip install alabaster -RUN pip install sphinx_bootstrap_theme +RUN pip install Sphinx==1.4 +RUN pip install sphinx_rtd_theme +RUN pip install alabaster +RUN pip install sphinx_bootstrap_theme -CMD ["/bin/bash"] \ No newline at end of file +CMD ["/bin/bash"]