Added minor Salt Sphinx domain

This commit is contained in:
Seth House 2013-12-13 22:33:50 -07:00
parent 2b3897d114
commit c0f74f95aa
2 changed files with 29 additions and 2 deletions

27
doc/_ext/saltdomain.py Normal file
View File

@ -0,0 +1,27 @@
from sphinx.locale import l_, _
from sphinx.domains import python as python_domain
class SaltModuleIndex(python_domain.PythonModuleIndex):
name = 'modindex'
localname = l_('Salt Module Index')
shortname = l_('all salt modules')
class SaltDomain(python_domain.PythonDomain):
name = 'salt'
label = 'Salt'
data_version = 2
indices = [
SaltModuleIndex,
]
# Monkey-patch the Python domain remove the python module index
python_domain.PythonDomain.indices = []
def setup(app):
app.add_domain(SaltDomain)

View File

@ -128,13 +128,14 @@ templates_path = ['_templates']
exclude_patterns = ['_build', '_incl/*', 'ref/cli/_includes/*.rst']
extensions = [
'saltdomain', # Must come early
'saltdocs',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
'youtube',
'saltautodoc' # Needs to be listed AFTER sphunx.ext.autodoc
'saltautodoc', # Must be AFTER autodoc
]
modindex_common_prefix = ['salt.']
@ -209,7 +210,6 @@ html_show_sphinx = True
html_show_copyright = True
#html_use_opensearch = ''
### Latex options
latex_documents = [
('contents', 'Salt.tex', 'Salt Documentation', 'SaltStack, Inc.', 'manual'),