Skip to content

Commit

Permalink
Merge pull request #213 from whiteinge/doc-autosummary
Browse files Browse the repository at this point in the history
Move modules/states/renderers/returners docs to autosummary
  • Loading branch information
thatch45 committed Nov 13, 2011
2 parents 800c7ff + c1bbe34 commit c0b7b9c
Show file tree
Hide file tree
Showing 79 changed files with 523 additions and 372 deletions.
6 changes: 6 additions & 0 deletions doc/_templates/autosummary.rst.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ underline }}
{{ fullname }}
{{ underline }}

.. automodule:: {{ fullname }}
:members:
8 changes: 8 additions & 0 deletions doc/_templates/autosummarysidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% if parents %}
<h3>Parent topic</h3>
<ul>
{% for p in parents %}
<li><a href="{{ p.link|e }}">{{ p.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
16 changes: 3 additions & 13 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,9 @@ <h3>{{ _('Navigation') }}</h3>
<div class="sidebar">
{%- block sidebarlogo %}{%- endblock %}

{%- if sidebars != None %}
{#- new style sidebar: explicitly include/exclude templates #}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
{%- else %}
{#- old style sidebars: using blocks -- should be deprecated #}
{%- block sidebartoc %}{%- include "localtoc.html" %}{%- endblock %}
{%- block sidebarrel %}{%- include "relations.html" %}{%- endblock %}
{%- block sidebarsourcelink %}{%- include "sourcelink.html" %}{%- endblock %}
{%- if customsidebar %}{%- include customsidebar %}{%- endif %}
{%- block sidebarsearch %}{%- include "searchbox.html" %}{%- endblock %}
{%- endif %}
{%- for sidebartemplate in sidebars|default(html_default_sidebars, true) %}
{%- include sidebartemplate %}
{%- endfor %}
</div>
{%- endif %}
{%- endmacro %}
Expand Down
18 changes: 16 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
templates_path = ['_templates']
exclude_patterns = ['_build']

extensions = ['saltdocs', 'sphinx.ext.autodoc', 'sphinx.ext.extlinks']
extensions = ['saltdocs', 'sphinx.ext.autodoc', 'sphinx.ext.extlinks', 'sphinx.ext.autosummary']

modindex_common_prefix = ['salt.']

autosummary_generate = True

# Define a substitution for linking to the latest release tarball
rst_prolog = """\
.. |latest| replace:: https://github.com/downloads/thatch45/salt/salt-%s.tar.gz
Expand All @@ -59,8 +61,20 @@
html_use_smartypants = False

html_additional_pages = {'index': 'index.html'}
html_sidebars = {'index': ['indexsidebar.html']}

html_default_sidebars = [
'localtoc.html',
'relations.html',
'sourcelink.html',
'searchbox.html']

html_sidebars = {
'ref/**/all/salt.*': ['autosummarysidebar.html'] + html_default_sidebars,
'index': ['indexsidebar.html', 'searchbox.html'],
}

html_context = {
'html_default_sidebars': html_default_sidebars,
'github_base': 'https://github.com/thatch45/salt',
'github_issues': 'https://github.com/thatch45/salt/issues',
'github_downloads': 'https://github.com/thatch45/salt/downloads',
Expand Down
4 changes: 4 additions & 0 deletions doc/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ Full Table of Contents

ref/index
ref/modules/*
ref/modules/all/index
ref/grains
ref/returners/*
ref/returners/all/index
ref/states/*
ref/states/all/index
ref/renderers/*
ref/renderers/all/index
ref/runners
ref/peer
ref/syndic
Expand Down
8 changes: 4 additions & 4 deletions doc/home.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ get much more out of Salt.

* **Remote execution:**
:doc:`Writing modules <ref/modules/index>`
| :doc:`full list of modules <ref/modules/modules>`
| :doc:`full list of modules <ref/modules/all/index>`
* **System info & detection:**
:doc:`Grains <ref/grains>`
* **Displaying or storing responses:**
:doc:`Writing returners <ref/returners/index>`
| :doc:`full list of returners <ref/returners/returners>`
| :doc:`full list of returners <ref/returners/all/index>`
* **State enforcement:**
:doc:`States <ref/states/index>`
| :doc:`Highstate data structure <ref/states/highstate>`
| :doc:`full list of states <ref/states/states>`
| :doc:`full list of states <ref/states/all/index>`
* **Renderers:**
:doc:`Renderers <ref/renderers/index>`
| :doc:`full list of renderers <ref/renderers/renderers>`
| :doc:`full list of renderers <ref/renderers/all/index>`
* **Transferring & syncing files:**
:doc:`File Server <ref/file_server/index>`
* **Network topology:**
Expand Down
49 changes: 49 additions & 0 deletions doc/ref/modules/all/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.. _all-salt.modules:

============================
Full list of builtin modules
============================

.. currentmodule:: salt.modules

.. autosummary::
:toctree:
:template: autosummary.rst.tmpl

apache
apt
butterkvm
cluster
cmd
cp
cron
disk
file
freebsdpkg
grains
groupadd
hosts
kmod
linux_sysctl
mdadm
moosefs
mount
mysql
network
pacman
ps
publish
puppet
pw_group
pw_user
selinux
service
shadow
solr
ssh
state
status
test
useradd
virt
yum
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.apache.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===================
salt.modules.apache
===================

.. automodule:: salt.modules.apache
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.apt.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
================
salt.modules.apt
================

.. automodule:: salt.modules.apt
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.butterkvm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
======================
salt.modules.butterkvm
======================

.. automodule:: salt.modules.butterkvm
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.cluster.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====================
salt.modules.cluster
====================

.. automodule:: salt.modules.cluster
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.cmd.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
================
salt.modules.cmd
================

.. automodule:: salt.modules.cmd
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.cp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===============
salt.modules.cp
===============

.. automodule:: salt.modules.cp
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.cron.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=================
salt.modules.cron
=================

.. automodule:: salt.modules.cron
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.disk.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=================
salt.modules.disk
=================

.. automodule:: salt.modules.disk
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.file.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=================
salt.modules.file
=================

.. automodule:: salt.modules.file
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.freebsdpkg.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=======================
salt.modules.freebsdpkg
=======================

.. automodule:: salt.modules.freebsdpkg
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.grains.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===================
salt.modules.grains
===================

.. automodule:: salt.modules.grains
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.groupadd.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=====================
salt.modules.groupadd
=====================

.. automodule:: salt.modules.groupadd
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.hosts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
==================
salt.modules.hosts
==================

.. automodule:: salt.modules.hosts
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.kmod.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=================
salt.modules.kmod
=================

.. automodule:: salt.modules.kmod
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.linux_sysctl.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=========================
salt.modules.linux_sysctl
=========================

.. automodule:: salt.modules.linux_sysctl
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.mdadm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
==================
salt.modules.mdadm
==================

.. automodule:: salt.modules.mdadm
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.moosefs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====================
salt.modules.moosefs
====================

.. automodule:: salt.modules.moosefs
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.mount.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
==================
salt.modules.mount
==================

.. automodule:: salt.modules.mount
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.mysql.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
==================
salt.modules.mysql
==================

.. automodule:: salt.modules.mysql
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.network.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====================
salt.modules.network
====================

.. automodule:: salt.modules.network
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.pacman.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===================
salt.modules.pacman
===================

.. automodule:: salt.modules.pacman
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.ps.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===============
salt.modules.ps
===============

.. automodule:: salt.modules.ps
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.publish.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====================
salt.modules.publish
====================

.. automodule:: salt.modules.publish
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.puppet.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===================
salt.modules.puppet
===================

.. automodule:: salt.modules.puppet
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.pw_group.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=====================
salt.modules.pw_group
=====================

.. automodule:: salt.modules.pw_group
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.pw_user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====================
salt.modules.pw_user
====================

.. automodule:: salt.modules.pw_user
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.selinux.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====================
salt.modules.selinux
====================

.. automodule:: salt.modules.selinux
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.service.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====================
salt.modules.service
====================

.. automodule:: salt.modules.service
:members:
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.shadow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===================
salt.modules.shadow
===================

.. automodule:: salt.modules.shadow
:members:
Loading

0 comments on commit c0b7b9c

Please sign in to comment.