Browse Source

PDF docs are now available

Docs are now built in both html and pdf.
Html docs link to pdf docs.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I203942b27ddbfb540b3262c55faba509799ecc19
changes/88/787188/2
Jiri Podivin 2 months ago
parent
commit
b8710584c7
3 changed files with 17 additions and 8 deletions
  1. +1
    -0
      doc/requirements.txt
  2. +7
    -1
      doc/source/conf.py
  3. +9
    -7
      tox.ini

+ 1
- 0
doc/requirements.txt View File

@ -3,4 +3,5 @@ sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.2 # Apache-2.0
doc8>=0.8.0 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD
sphinxcontrib-svg2pdfconverter>=1.1.1 # BSD License
reno>=3.1.0 # Apache-2.0

+ 7
- 1
doc/source/conf.py View File

@ -15,6 +15,7 @@
import os
import sys
import datetime
# Add the project
sys.path.insert(0, os.path.abspath('../..'))
@ -27,6 +28,7 @@ sys.path.insert(0, os.path.join(os.path.abspath('.'), '_exts'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinxcontrib.apidoc',
'sphinxcontrib.rsvgconverter',
'sphinx.ext.viewcode',
'sphinx.ext.autodoc',
'openstackdocstheme',
@ -43,6 +45,7 @@ apidoc_separate_modules = True
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/validations-libs'
openstackdocs_use_storyboard = True
openstackdocs_pdf_link = True
openstackdocs_bug_project = 'tripleo'
openstackdocs_bug_tag = 'documentation'
@ -60,7 +63,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
copyright = u'2021, OpenStack Foundation'
copyright = u'{}, OpenStack Foundation'.format(datetime.date.year)
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['validations_libs.']
@ -106,3 +109,6 @@ latex_documents = [
'manual'
),
]
# Allow deeper levels of nesting for \begin...\end stanzas
latex_elements = {'maxlistdepth': 10, 'extraclassoptions': ',openany,oneside'}

+ 9
- 7
tox.ini View File

@ -98,13 +98,15 @@ commands=
sphinx-build -a -E -W -d doc/build/doctrees --keep-going -b html doc/source doc/build/html -T
doc8 doc
#TODO(jpodivin): pdf-docs don't compile properly
; [testenv:pdf-docs]
; whitelist_externals = make
; deps = {[testenv:docs]deps}
; commands =
; sphinx-build -W -b latex doc/source doc/build/pdf
; make -C doc/build/pdf
[testenv:pdf-docs]
whitelist_externals = make
description =
Build PDF documentation.
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[doc8]
# Settings for doc8:


Loading…
Cancel
Save