Improving syntax highlighting in HTML docs (#42472)

* Adding improved YAML lexer for HTML docs.

* Fixing (some of) the warnings.

* Fixing more warnings.

* Removing ansible- prefix from lexer names.

* Rename extensions -> _extensions.

* Removing superfluous module search path extension.
This commit is contained in:
Felix Fontein 2018-07-31 22:28:16 +02:00 committed by Alicia Cozine
commit e7e63ec1e8
3 changed files with 500 additions and 3 deletions

View file

@ -26,7 +26,7 @@ import os
# sys.path.append(os.path.abspath('some/directory'))
#
sys.path.insert(0, os.path.join('ansible', 'lib'))
sys.path.append(os.path.abspath('_themes'))
sys.path.append(os.path.abspath(os.path.join('..', '_extensions')))
VERSION = '2.6'
AUTHOR = 'Ansible, Inc'
@ -39,7 +39,7 @@ AUTHOR = 'Ansible, Inc'
# They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# TEST: 'sphinxcontrib.fulltoc'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'pygments_lexer']
# Later on, add 'sphinx.ext.viewcode' to the list if you want to have
# colorized code generated too for references.