Browse Source

Merge "Build pdf doc"

tags/1.0.0
Zuul Gerrit Code Review 9 months ago
parent
commit
2d9b7cadf5
3 changed files with 18 additions and 15 deletions
  1. +2
    -1
      doc/requirements.txt
  2. +8
    -14
      doc/source/conf.py
  3. +8
    -0
      tox.ini

+ 2
- 1
doc/requirements.txt View File

@@ -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

+ 8
- 14
doc/source/conf.py View File

@@ -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
- 0
tox.ini View File

@@ -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…
Cancel
Save