Template updates.

This commit is contained in:
Eric Holscher 2016-08-25 16:23:48 -07:00
parent 6025db45a7
commit 3aa1747795
6 changed files with 32 additions and 15 deletions

View File

@ -9,8 +9,10 @@ Below is a list of all items that are documented here.
:glob: :glob:
:maxdepth: 1 :maxdepth: 1
{%- for page in pages|sort %} {# Force whitespace #}
{% if page.top_level_object %}
/autoapi/{{ page.id.split('.')|join('/') }}/index {%- for page in pages %}
{% endif %} {%- if page.top_level_object %}
{{ page.include_path }}
{%- endif %}
{%- endfor %} {%- endfor %}

View File

@ -1,14 +1,12 @@
{% if not 'nested' in obj._human %} {% if not 'nested' in obj._human %}
{{ obj.short_name }} Class {{ obj.short_name }}
{{ "-" * obj.short_name|length }} ~~~~~~{{ "~" * obj.short_name|length }}
{% endif %} {% endif %}
.. py:class:: {{ obj.short_name }}{% if obj.args %}({{ obj.args|join(',') }}){% endif %} .. py:class:: {{ obj.short_name }}{% if obj.args %}({{ obj.args|join(',') }}){% endif %}
{%- if obj.docstring %} {%- if obj.docstring %}
.. rubric:: Summary
{{ obj.docstring|indent(3) }} {{ obj.docstring|indent(3) }}
{% endif %} {% endif %}

View File

@ -1,6 +1,6 @@
{%- if obj.display %} {%- if obj.display %}
.. function:: {{ obj.name.split('.')[-1] }}({{ obj.args|join(',') }}) .. function:: {{ obj.name }}({{ obj.args|join(',') }})
{% if obj.docstring %} {% if obj.docstring %}
{{ obj.docstring.strip()|indent(3) }} {{ obj.docstring.strip()|indent(3) }}

View File

@ -1,9 +1,9 @@
{%- if obj.display %} {%- if obj.display %}
.. method:: {{ obj.name.split('.')[-1] }}({{ obj.args[1:]|join(',') }}) .. method:: {{ obj.name }}({{ obj.args[1:]|join(',') }})
{% if obj.docstring %} {% if obj.docstring %}
{{ obj.docstring.strip()|indent(3) }} {{ obj.docstring }}
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -1,10 +1,8 @@
{{ obj.name }} Module {{ obj.name }}
{{ "~" * obj.name|length }} -------{{ "-" * obj.name|length }}
{%- if obj.docstring %} {%- if obj.docstring %}
.. rubric:: Summary
{{ obj.docstring }} {{ obj.docstring }}
{% endif %} {% endif %}

View File

@ -0,0 +1,19 @@
Package {{ obj.name }}
========{{ "=" * obj.name|length }}
{%- if obj.docstring %}
{{ obj.docstring }}
{% endif %}
.. py:module:: {{ obj.name }}
{% block content %}
{%- for obj_item in obj.children %}
{{ obj_item.rendered|indent(0) }}
{%- endfor %}
{% endblock %}