sphinx-autoapi/autoapi/templates/javascript/module.rst
Anthony Johnson 87a16ea421 Use more proper slugging on filenames for object
This resolves some issues with special characters in paths on Windows based
systems. It replaces special characters and unicode characters to ensure paths
are predictable.
2015-08-18 18:10:25 -07:00

53 lines
790 B
ReStructuredText

{{ obj.name }}
{{ "-" * obj.name|length }}
{% block toc %}
{% if obj.children %}
.. toctree::
:maxdepth: 4
{% for item in obj.children|sort %}
/autoapi/{{ item.pathname }}/index
{%- endfor %}
{% endif %}
{% endblock %}
{% if obj.docstring %}
.. rubric:: Summary
{{ obj.docstring }}
{% endif %}
.. js:module:: {{ obj.name }}
{% block content %}
{%- macro display_type(item_type) %}
{{ item_type.title() }}
{{ "*" * item_type|length }}
{%- for obj_item in obj.item_map.get(item_type, []) %}
{% macro render() %}{{ obj_item.render() }}{% endmacro %}
{{ render()|indent(4) }}
{%- endfor %}
{%- endmacro %}
{%- for item_type in obj.item_map.keys() %}
{% if item_type.lower() != 'module' %}
{{ display_type(item_type) }}
{% endif %}
{%- endfor %}
{% endblock %}