{% extends "base.html" %} {% from "chirpui/rendered_content.html" import rendered_content %} {% from "chirpui/layout.html" import grid %} {% from "chirpui/callout.html" import callout %} {% from "partials/navigation-components.html" import page_navigation %} {% from "autodoc/partials/_macros/function-member.html" import function_member %} {% from "autodoc/partials/_macros/class-member.html" import class_member %} {% block content %} {% let element = element | default(metadata?.autodoc_element ?? none) %} {% let symbols = element?.children ?? [] %} {% let source_file = element?.source_file ?? none %} {% let source_line = element?.line_number ?? none %} {% let github_edit_base = config?.params?.github_edit_base ?? config?.github_edit_base ?? none %} {% let repo_url = config?.params?.repo_url ?? config?.repo_url ?? none %} {% let source_href = (github_edit_base ~ source_file) if (github_edit_base and source_file) else ((repo_url ~ "/blob/main/" ~ source_file ~ ("#L" ~ source_line if source_line else "")) if (repo_url and source_file) else none) %} {# Autodoc pages rarely carry prose toc_items, but a multi-member module gets a dedicated on-page symbol rail so the right aside (and its sticky styling) is used to jump between members. See #160. #} {% let has_symbol_rail = (toc_items | length == 0) and (symbols | length > 0) %} {% let show_toc_rail = (toc_items | length > 0) or has_symbol_rail %}
{% include "autodoc/partials/header.html" %}
{% include "autodoc/partials/signature.html" %} {% include "autodoc/partials/badges.html" %} {% if element?.deprecated ?? none %} {% call callout(variant="warning", title="Deprecated", cls="chirp-theme-reference-deprecated") %}{{ element.deprecated | safe }}{% end %} {% end %} {% if element?.description ?? none %} {% call rendered_content(compact=true, cls="chirp-theme-reference-description") %}{{ element.description |> markdownify |> safe }}{% end %} {% end %} {% include "autodoc/partials/params-table.html" %} {% include "autodoc/partials/returns.html" %} {% include "autodoc/partials/raises.html" %} {% if symbols | length > 0 %}

Symbols on this page

{% call grid(cols=2, gap="md", cls="chirp-theme-reference-symbol-grid") %} {% for symbol in symbols %} {% let symbol_kind = symbol?.element_type ?? "member" %} {% if symbol_kind == "class" %}{{ class_member(symbol) }}{% else %}{{ function_member(symbol) }}{% end %} {% end %} {% end %}
{% end %} {% include "autodoc/partials/members.html" %} {% include "autodoc/partials/examples.html" %} {% if source_href %}

{{ icon('code', size=14) }} View source{% if source_file %} ยท {{ source_file }}{% if source_line %}:{{ source_line }}{% end %}{% end %}

{% end %}
{% if page %}{{ page_navigation(page) }}{% end %} {% with footer_class='chirp-theme-footer chirp-theme-footer--shell' %}{% include 'partials/site-footer.html' %}{% end %}
{% if show_toc_rail %} {% end %}
{% end %} {% block site_footer %}{% end %}