PDF Documentation Build tox target
This patch adds a `pdf-docs` tox target that will build PDF versions of our docs. As per the Train community goal: https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt to convert our SVGs. Change-Id: I04319a1195873d63bfc45ffb0f5c7c89fb797652 Story: 2006105
This commit is contained in:
parent
ae2f3a311b
commit
9cfc60f307
@ -3,8 +3,10 @@
|
|||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
# this is required for the docs build jobs
|
# this is required for the docs build jobs
|
||||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
sphinx>=1.8.0,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
|
||||||
|
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
||||||
|
openstackdocstheme>=1.20.0 # Apache-2.0
|
||||||
doc8>=0.6.0 # Apache-2.0
|
doc8>=0.6.0 # Apache-2.0
|
||||||
reno>=2.5.0 # Apache-2.0
|
reno>=2.5.0 # Apache-2.0
|
||||||
Jinja2>=2.10 # BSD License (3 clause)
|
Jinja2>=2.10 # BSD License (3 clause)
|
||||||
|
@ -48,8 +48,10 @@ sys.setrecursionlimit(4000)
|
|||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
|
'sphinx.ext.autodoc',
|
||||||
'openstackdocstheme',
|
'openstackdocstheme',
|
||||||
'metadata-docs-rhel7',
|
'metadata-docs-rhel7',
|
||||||
|
'sphinxcontrib.rsvgconverter',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
@ -76,7 +78,7 @@ title = 'ansible-hardening Documentation:'
|
|||||||
|
|
||||||
# The link to the browsable source code (for the left hand menu)
|
# The link to the browsable source code (for the left hand menu)
|
||||||
oslosphinx_cgit_link = (
|
oslosphinx_cgit_link = (
|
||||||
'https://git.openstack.org/cgit/openstack/{}'.format(target_name)
|
'https://opendev.org/openstack/{}'.format(target_name)
|
||||||
)
|
)
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
@ -246,10 +248,12 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, target_name + '.tex',
|
(master_doc, 'doc-' + target_name + '.tex',
|
||||||
title, author, 'manual'),
|
title, author, 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
latex_use_xindy = False
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
# the title page.
|
# the title page.
|
||||||
# latex_logo = None
|
# latex_logo = None
|
||||||
@ -313,3 +317,5 @@ pdf_documents = [
|
|||||||
(master_doc, target_name,
|
(master_doc, target_name,
|
||||||
title, author)
|
title, author)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
locale_dirs = ['locale/']
|
11
tox.ini
11
tox.ini
@ -33,13 +33,22 @@ setenv =
|
|||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands=
|
commands =
|
||||||
bash -c "rm -rf doc/build"
|
bash -c "rm -rf doc/build"
|
||||||
# NOTE(mhayden): doc8 really dislikes the automated docs. This should be
|
# NOTE(mhayden): doc8 really dislikes the automated docs. This should be
|
||||||
# enabled again later.
|
# enabled again later.
|
||||||
#doc8 doc
|
#doc8 doc
|
||||||
sphinx-build -W -b html doc/source doc/build/html
|
sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
|
[testenv:pdf-docs]
|
||||||
|
basepython = python3
|
||||||
|
deps = {[testenv:docs]deps}
|
||||||
|
whitelist_externals =
|
||||||
|
make
|
||||||
|
commands =
|
||||||
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
||||||
|
make -C doc/build/pdf
|
||||||
|
|
||||||
|
|
||||||
[doc8]
|
[doc8]
|
||||||
# Settings for doc8:
|
# Settings for doc8:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user