mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-06 09:20:27 +00:00
4e2d5ccdfb
As the parent block is a namespace declaration, we can use nesting to imply the namespace. This removes the namespace from the object name and matches what we do on other pages.
67 lines
1.2 KiB
ReStructuredText
67 lines
1.2 KiB
ReStructuredText
{% block title %}
|
|
|
|
{{ obj.name }} {{ obj.type.title() }}
|
|
{{ "=" * (obj.name|length + obj.type|length + 1) }}
|
|
|
|
{% endblock %}
|
|
|
|
{% block toc %}
|
|
|
|
{% if obj.children %}
|
|
|
|
.. toctree::
|
|
:hidden:
|
|
:maxdepth: 2
|
|
|
|
{% for item in obj.children|sort %}
|
|
{% if item.type != 'namespace' %}
|
|
{{ item.include_path }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% if obj.references %}
|
|
|
|
.. toctree::
|
|
:hidden:
|
|
:maxdepth: 2
|
|
|
|
{% for item in obj.references|sort %}
|
|
{% if item.type != 'namespace' %}
|
|
{{ item.include_path }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
|
|
{%- macro display_type(item_type) %}
|
|
|
|
.. rubric:: {{ item_type.title() }}
|
|
|
|
{%- for obj_item in obj.item_map.get(item_type, []) %}
|
|
{% macro render() %}{{ obj_item.summary }}{% endmacro %}
|
|
|
|
{{ obj_item.type }} :dn:{{ obj_item.ref_directive }}:`{{ obj_item.ref_short_name }}`
|
|
.. object: type={{ obj_item.type }} name={{ obj_item.ref_name }}
|
|
|
|
{{ render()|indent(8) }}
|
|
|
|
{%- endfor %}
|
|
{%- endmacro %}
|
|
|
|
.. dn:{{ obj.ref_type }}:: {{ obj.name }}
|
|
|
|
{%- for item_type in obj.item_map.keys() %}
|
|
{{ display_type(item_type) }}
|
|
{%- endfor %}
|
|
|
|
|
|
{% endblock %}
|