mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Added minor Salt Sphinx domain
This commit is contained in:
parent
2b3897d114
commit
c0f74f95aa
27
doc/_ext/saltdomain.py
Normal file
27
doc/_ext/saltdomain.py
Normal 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)
|
@ -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'),
|
||||
|
Loading…
Reference in New Issue
Block a user