Build pdf doc
The is one of community goals that each project could produce a
single PDF file. The pdf should be in the output of openstack-tox-docs
job.
TeX packages are required to build PDF locally, following is recommended:
* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended
More about the goal:
https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
https://etherpad.openstack.org/p/train-pdf-support-goal
https://etherpad.openstack.org/p/pdf-goal-train-common-problems
Change-Id: Id2244fa8c70e8b8c09e309998012041883b98ab1
(cherry picked from commit 386d5df557
)
This commit is contained in:
parent
fedc350fdc
commit
749d403c19
|
@ -5,4 +5,5 @@ reno>=2.5.0 # Apache-2.0
|
|||
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
|
||||
sphinxcontrib-apidoc>=0.2.0 # BSD
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
||||
openstackdocstheme>=1.20.0 # Apache-2.0
|
||||
|
|
|
@ -21,14 +21,10 @@ sys.path.insert(0, os.path.abspath('../..'))
|
|||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = [
|
||||
'sphinxcontrib.apidoc',
|
||||
'sphinxcontrib.rsvgconverter',
|
||||
'openstackdocstheme',
|
||||
]
|
||||
|
||||
try:
|
||||
import openstackdocstheme
|
||||
extensions.append('openstackdocstheme')
|
||||
except ImportError:
|
||||
openstackdocstheme = None
|
||||
|
||||
autoclass_content = 'both'
|
||||
apidoc_module_dir = '../../metalsmith'
|
||||
apidoc_output_dir = 'reference/api'
|
||||
|
@ -46,7 +42,6 @@ source_suffix = '.rst'
|
|||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'metalsmith'
|
||||
copyright = u'2018, MetalSmith Developers '
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
|
@ -77,21 +72,20 @@ pygments_style = 'sphinx'
|
|||
# html_theme = '_theme'
|
||||
# html_static_path = ['static']
|
||||
|
||||
if openstackdocstheme is not None:
|
||||
html_theme = 'openstackdocs'
|
||||
else:
|
||||
html_theme = 'default'
|
||||
html_theme = 'openstackdocs'
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = '%sdoc' % project
|
||||
htmlhelp_basename = 'metalsmithdoc'
|
||||
|
||||
latex_use_xindy = False
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass
|
||||
# [howto/manual]).
|
||||
latex_documents = [
|
||||
('index',
|
||||
'%s.tex' % project,
|
||||
u'%s Documentation' % project,
|
||||
'doc-metalsmith.tex',
|
||||
u'MetalSmith Documentation',
|
||||
u'MetalSmith Developers', 'manual'),
|
||||
]
|
||||
|
||||
|
|
8
tox.ini
8
tox.ini
|
@ -54,6 +54,14 @@ deps =
|
|||
commands =
|
||||
sphinx-build -a -E -W -b html doc/source doc/build/html
|
||||
|
||||
[testenv:pdf-docs]
|
||||
basepython = python3
|
||||
whitelist_externals = make
|
||||
deps = {[testenv:docs]deps}
|
||||
commands =
|
||||
sphinx-build -W -b latex doc/source doc/build/pdf
|
||||
make -C doc/build/pdf
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps =
|
||||
|
|
Loading…
Reference in New Issue