Merge "PDF docs are now available"

This commit is contained in:
Zuul 2021-04-21 05:46:38 +00:00 committed by Gerrit Code Review
commit 3b8a90ad9b
3 changed files with 17 additions and 8 deletions

View File

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

View File

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

16
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 sphinx-build -a -E -W -d doc/build/doctrees --keep-going -b html doc/source doc/build/html -T
doc8 doc doc8 doc
#TODO(jpodivin): pdf-docs don't compile properly [testenv:pdf-docs]
; [testenv:pdf-docs] whitelist_externals = make
; whitelist_externals = make description =
; deps = {[testenv:docs]deps} Build PDF documentation.
; commands = envdir = {toxworkdir}/docs
; sphinx-build -W -b latex doc/source doc/build/pdf deps = {[testenv:docs]deps}
; make -C doc/build/pdf commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[doc8] [doc8]
# Settings for doc8: # Settings for doc8: