Generate a PDF version of the docsite. Request from a user in Slack. (#2900)

This commit is contained in:
Katelyn Baker 2018-03-29 12:43:22 +01:00 committed by GitHub
parent 2f0f737c3f
commit c59f3e0786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 1 deletions

View File

@ -190,3 +190,6 @@ pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
pdf:
$(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) $(BUILDDIR)/pdf

View File

@ -11,4 +11,7 @@ else
source virtualenv/Scripts/activate
fi
# TODO: The PDF rendering is pretty ugly and can be improved a lot.
make pdf
mv build/pdf/corda-developer-site.pdf build/html/_static/corda-developer-site.pdf
make html

View File

@ -10,3 +10,4 @@ six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.4.4
sphinx-rtd-theme==0.1.9
rst2pdf==0.93

View File

@ -28,7 +28,13 @@ import sphinx_rtd_theme
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
extensions = ['rst2pdf.pdfbuilder']
# PDF configuration
pdf_documents = [('index', u'corda-developer-site', u'Corda Developer Documentation', u'R3')]
pdf_stylesheets = ['sphinx', 'kerning', 'a4', 'murphy', 'tenpoint']
pdf_compressed = True
pdf_fit_mode = "shrink"
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@ -22,8 +22,12 @@ If you have questions or comments, then get in touch on `Slack <https://slack.co
We look forward to seeing what you can do with Corda!
.. note:: You can read this site offline. Either `download the PDF`_ or download the Corda source code, run ``gradle buildDocs`` and you will have
a copy of this site in the ``docs/build/html`` directory.
.. _`introductory white paper`: _static/corda-introductory-whitepaper.pdf
.. _`technical white paper`: _static/corda-technical-whitepaper.pdf
.. _`download the PDF`: _static/corda-developer-site.pdf
.. toctree::
:maxdepth: 1