diff --git a/doc/source/conf.py b/doc/source/conf.py index f4caa05..6b47a46 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -38,6 +38,7 @@ extensions = [ 'openstackdocstheme', 'sphinx.ext.autodoc', + 'sphinxcontrib.rsvgconverter', ] # Add any paths that contain templates here, relative to this directory. @@ -62,10 +63,11 @@ description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.' project = 'OpenStack-Ansible' role_name = 'rsyslog_client' target_name = 'openstack-ansible-' + role_name -title = 'OpenStack-Ansible Documentation: ' + role_name + 'role' +title = 'OpenStack-Ansible Documentation: ' + role_name + ' role' # openstackdocstheme options openstackdocs_repo_name = 'openstack/' + target_name +openstackdocs_pdf_link = True openstackdocs_bug_project = project.lower() openstackdocs_bug_tag = '' @@ -228,10 +230,12 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, target_name + '.tex', - title, author, 'manual'), + (master_doc, 'doc-' + target_name + '.tex', + title.replace("_", r"\_"), author, 'manual'), ] +latex_use_xindy = False + # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None @@ -288,3 +292,11 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False +# -- Options for PDF output -------------------------------------------------- + +pdf_documents = [ + (master_doc, target_name, + title, author) +] + +locale_dirs = ['locale/'] diff --git a/tox.ini b/tox.ini index fccd0b5..a08a384 100644 --- a/tox.ini +++ b/tox.ini @@ -21,7 +21,7 @@ passenv = TESTING_BRANCH TESTING_HOME USER -whitelist_externals = +allowlist_externals = bash setenv = PYTHONUNBUFFERED=1 @@ -31,14 +31,20 @@ setenv = WORKING_DIR={toxinidir} [testenv:docs] -deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/doc/requirements.txt -commands= +deps = -r{toxinidir}/doc/requirements.txt +commands = bash -c "rm -rf doc/build" doc8 doc sphinx-build -W --keep-going -b html doc/source doc/build/html +[testenv:pdf-docs] +deps = {[testenv:docs]deps} +allowlist_externals = + make +commands = + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [doc8] # Settings for doc8: extensions = .rst