{%- import "partials/macros.html" as m with context -%} {%- set sumi = sumi if sumi is defined else {} -%} {%- set theme = config.theme -%} {%- set hide = (page.meta.hide if page and page.meta and page.meta.hide else []) + (theme.hide or []) -%} {%- set layout = page.meta.layout if page and page.meta and page.meta.layout else 'docs' -%} {%- set has_sections = nav.items | selectattr('is_section') | list | length > 0 -%} {%- set tabs_on = theme.navigation_tabs and has_sections -%} {%- set active_top = nav.items | selectattr('active') | first -%} {%- if tabs_on -%} {%- set side_items = active_top.children if active_top and active_top.is_section else [] -%} {%- else -%} {%- set side_items = nav.items -%} {%- endif -%} {%- if 'sidebar' in hide or 'navigation' in hide or layout in ('wide', 'landing', 'blog') -%}{%- set side_items = [] -%}{%- endif -%} {#- On small screens the header tabs are hidden, so the drawer lists them too. -#} {%- set drawer_tabs = tabs_on and 'navigation' not in hide and layout != 'landing' -%} {%- set toc_list = page.toc.items if page and page.toc else [] -%} {%- if toc_list | length == 1 and toc_list[0].level == 1 -%}{%- set toc_list = toc_list[0].children -%}{%- endif -%} {%- set show_toc = toc_list | length > 0 and 'toc' not in hide and layout not in ('wide', 'landing', 'blog') -%} {%- block site_meta %} {%- set description = page.meta.description if page and page.meta and page.meta.description else config.site_description -%} {%- if description %}{% endif %} {%- if config.site_author %}{% endif %} {%- if page and page.canonical_url %}{% endif %} {%- if page and page.previous_page %}{% endif %} {%- if page and page.next_page %}{% endif %} {%- if i18n and page %} {%- for alt in i18n.languages if alt.available %} {%- if alt.lang == i18n.default_language %} {%- endif %} {%- endfor %} {%- endif %} {%- if sumi.markdown_url %}{% endif %} {%- if sumi.llms_txt %}{% endif %} {%- if sumi.feed_url %}{% endif %} {%- if page and page.title %} {%- set og_image = page.meta.image if page.meta and page.meta.image else theme.social_image -%} {%- if og_image and not (og_image.startswith('http://') or og_image.startswith('https://')) -%} {%- set og_image = config.site_url.rstrip('/') ~ '/' ~ og_image.lstrip('/') if config.site_url else None -%} {%- endif %} {%- set og_title = config.site_name if page.is_homepage else page.title | striptags %} {%- if description %}{% endif %} {%- set og_locale = sumi_language | replace('-', '_') %} {%- if page.canonical_url %}{% endif %} {%- if og_image %}{% endif %} {%- if sumi.is_post and page.meta.date %}{% endif %} {%- if description %}{% endif %} {%- endif %} {%- endblock %} {%- block htmltitle %} {% if page and page.title and not page.is_homepage %}{{ page.title | striptags }} ยท {% endif %}{{ config.site_name }} {%- endblock %} {%- block styles %} {%- if theme.accent %}{{ m.accent_style(theme.accent) }}{% endif %} {%- if 'math' in (sumi.features or []) %}{% endif %} {%- for path in config.extra_css %}{% endfor %} {%- endblock %} {%- block analytics %}{% include "partials/analytics.html" %}{% endblock %} {%- block extrahead %}{% endblock %} {{ t('skip_to_content') }} {%- if theme.announcement %}
{{ theme.announcement | sumi_links }}
{%- endif %} {%- block header %}{% include "partials/header.html" %}{% endblock %} {%- block layout %}
{%- if side_items or drawer_tabs %} {%- endif %}
{%- block content %}
{%- if 'breadcrumbs' not in hide %}{% include "partials/breadcrumbs.html" %}{% endif %} {%- if 'actions' not in hide %}{% include "partials/page-actions.html" %}{% endif %}
{%- if show_toc %}
{{ icon('list') }}{{ t('on_this_page') }}{{ icon('chevron-down', 'sumi-chevron') }} {% include "partials/toc.html" %}
{%- endif %}
{%- include "partials/untranslated.html" %} {%- block page_content %}{{ page.content }}{% endblock %}
{%- block article_footer %}{% include "partials/article-footer.html" %}{% endblock %}
{%- endblock %}
{%- if show_toc %} {%- endif %}
{%- endblock %} {%- block footer %}{% if 'footer' not in hide %}{% include "partials/footer.html" %}{% endif %}{% endblock %} {% include "partials/palette.html" %} {%- block scripts %} {%- for script in config.extra_javascript %}{{ script | script_tag }}{% endfor %} {%- endblock %}