Merge "Generate PDF documentation"

This commit is contained in:
Zuul 2019-10-23 06:41:24 +00:00 committed by Gerrit Code Review
commit 38227c722f
3 changed files with 30 additions and 5 deletions

2
doc/requirements.txt Normal file
View File

@ -0,0 +1,2 @@
openstackdocstheme>=1.30.0 # Apache-2.0
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD

View File

@ -23,7 +23,8 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'openstackdocstheme'
'openstackdocstheme',
'sphinxcontrib.rsvgconverter',
]
# openstackdocstheme options
@ -73,10 +74,21 @@ htmlhelp_basename = '%sdoc' % project
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
'doc-designate-dashboard.tex',
u'Designate Dashboard Documentation',
u'OpenStack Foundation', 'manual', True),
]
latex_domain_indices = False
latex_elements = {
# Additional stuff for the LaTeX preamble.
# openany: Skip blank pages in generated PDFs
'extraclassoptions': 'openany,oneside',
'makeindex': '',
'printindex': '',
'preamble': r'\setcounter{tocdepth}{3}',
}
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}

13
tox.ini
View File

@ -43,7 +43,18 @@ commands =
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
envdir = {toxworkdir}/docs
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[flake8]
# E123, E125 skipped as they are invalid PEP-8.