diff --git a/doc/requirements.txt b/doc/requirements.txt index 512ff889..69f1f35c 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,8 +3,10 @@ # process, which may cause wedges in the gate later. # this is required for the docs build jobs -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 +sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD +sphinx>=1.8.0,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD +sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD +openstackdocstheme>=1.20.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 Jinja2>=2.10 # BSD License (3 clause) diff --git a/doc/source/conf.py b/doc/source/conf.py index 25b682b0..22b8c24e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -48,8 +48,10 @@ sys.setrecursionlimit(4000) # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'sphinx.ext.autodoc', 'openstackdocstheme', 'metadata-docs-rhel7', + 'sphinxcontrib.rsvgconverter', ] # Add any paths that contain templates here, relative to this directory. @@ -76,7 +78,7 @@ title = 'ansible-hardening Documentation:' # The link to the browsable source code (for the left hand menu) oslosphinx_cgit_link = ( - 'https://git.openstack.org/cgit/openstack/{}'.format(target_name) + 'https://opendev.org/openstack/{}'.format(target_name) ) # The version info for the project you're documenting, acts as replacement for @@ -246,10 +248,12 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, target_name + '.tex', + (master_doc, 'doc-' + target_name + '.tex', title, 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 @@ -313,3 +317,5 @@ pdf_documents = [ (master_doc, target_name, title, author) ] + +locale_dirs = ['locale/'] \ No newline at end of file diff --git a/tox.ini b/tox.ini index 38418643..d0f14eca 100644 --- a/tox.ini +++ b/tox.ini @@ -33,13 +33,22 @@ setenv = [testenv:docs] basepython = python3 deps = -r{toxinidir}/doc/requirements.txt -commands= +commands = bash -c "rm -rf doc/build" # NOTE(mhayden): doc8 really dislikes the automated docs. This should be # enabled again later. #doc8 doc sphinx-build -W -b html doc/source doc/build/html +[testenv:pdf-docs] +basepython = python3 +deps = {[testenv:docs]deps} +whitelist_externals = + make +commands = + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [doc8] # Settings for doc8: