From 92613a1eec543a00dd25dc6cdd407929323a811c Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 19 Dec 2021 13:12:11 -0500 Subject: [PATCH] doc: switch html theme to sphinx_rtd_theme --- README-maintainer | 7 +++++++ appimage/Dockerfile | 2 +- build-scripts/build-linux | 2 +- build-scripts/prebuild | 2 +- manual/conf.py | 7 ++++++- manual/installation.rst | 9 +++++---- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/README-maintainer b/README-maintainer index 8306d9af..f161df46 100644 --- a/README-maintainer +++ b/README-maintainer @@ -31,6 +31,13 @@ Memory checks: --enable-werror --disable-shared +CHECKING DOCS ON readthedocs + +To check docs on readthedocs.io without running all of CI, push to the +doc-check branch. Then visit https://qpdf.readthedocs.io/en/doc-check/ +Building docs from pull requests is also enabled. + + GOOGLE OSS-FUZZ * See ../misc/fuzz (not in repo) for unfixed, downloaded fuzz test cases diff --git a/appimage/Dockerfile b/appimage/Dockerfile index 51221908..0b7232f9 100644 --- a/appimage/Dockerfile +++ b/appimage/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && \ inkscape imagemagick busybox-static wget fuse && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -RUN pip3 install sphinx +RUN pip3 install sphinx sphinx_rtd_theme COPY entrypoint /entrypoint RUN chmod +x /entrypoint ENTRYPOINT [ "/entrypoint" ] diff --git a/build-scripts/build-linux b/build-scripts/build-linux index 1e20a224..bb5baf36 100755 --- a/build-scripts/build-linux +++ b/build-scripts/build-linux @@ -5,7 +5,7 @@ sudo apt-get -y install \ autoconf build-essential zlib1g-dev libjpeg-dev libgnutls28-dev \ libssl-dev python3-pip texlive-latex-extra latexmk \ inkscape imagemagick libtiff-tools ghostscript -pip3 install sphinx +pip3 install sphinx sphinx_rtd_theme ./configure --enable-werror --enable-doc-maintenance \ --enable-crypto-native --enable-crypto-openssl --enable-crypto-gnutls \ --enable-show-failed-test-output --enable-test-compare-images diff --git a/build-scripts/prebuild b/build-scripts/prebuild index f8d1f61b..76f9bf6d 100755 --- a/build-scripts/prebuild +++ b/build-scripts/prebuild @@ -5,7 +5,7 @@ sudo apt-get update sudo apt-get -y install \ autoconf build-essential zlib1g-dev libjpeg-dev \ python3-pip texlive-latex-extra latexmk inkscape imagemagick -pip3 install sphinx +pip3 install sphinx sphinx_rtd_theme ./configure --enable-doc-maintenance make -j$(nproc) build_manual zip -r doc.zip doc/*html doc/*.pdf diff --git a/manual/conf.py b/manual/conf.py index 7dde20ca..aaed236f 100644 --- a/manual/conf.py +++ b/manual/conf.py @@ -6,14 +6,19 @@ # # To see the default sample conf.py, run sphinx-quickstart in an empty # directory. Most of the original comments and options were removed. +import sphinx_rtd_theme # noQA F401 project = 'QPDF' copyright = '2005-2021, Jay Berkenbilt' author = 'Jay Berkenbilt' release = '10.4.0' version = release -html_theme = 'nature' +extensions = [ + 'sphinx_rtd_theme', +] +html_theme = 'sphinx_rtd_theme' html_theme_options = { "body_max_width": None, } +html_logo = '../logo/qpdf.svg' highlight_language = 'none' diff --git a/manual/installation.rst b/manual/installation.rst index 568c2e20..197977e7 100644 --- a/manual/installation.rst +++ b/manual/installation.rst @@ -63,10 +63,11 @@ ghostscript. Pre-built documentation is distributed with qpdf, so you should generally not need to rebuild the documentation. In order to build the documentation from source, you need to install `Sphinx -`__. To build the PDF version of the -documentation, you need ``pdflatex``, ``latexmk``, and a fairly complete -LaTeX installation. Detailed requirements can be found in the Sphinx -documentation. +`__ along with the ``sphinx_rtd_doc`` theme +(``pip install sphinx sphinx_rtd_theme``). To build the PDF version of +the documentation, you need ``pdflatex``, ``latexmk``, and a fairly +complete LaTeX installation. Detailed requirements can be found in the +Sphinx documentation. .. _building: