{#- Data-driven landing page. Front matter: template: landing.html hero: eyebrow: "v0.1 ยท local-first" title: "Markdown in.
Docs out." text: "One sentence that sells it." actions: - {text: Get started, link: start/, icon: rocket, primary: true} install: pip install mkdocs-sumi code: {title: mkdocs.yml, lang: yaml, content: "..."} image: assets/hero.png sections: - {type: features, eyebrow, title, text, columns: 3, items: [{icon, title, text, link}]} - {type: split, title, text, code: {lang, title, content}, image, reverse: true} - {type: stats, items: [{value, label}]} - {type: steps, title, items: [{title, text}]} - {type: faq, title, items: [{q, a}]} - {type: cta, title, text, actions} - {type: content} # the page's Markdown body -#} {% extends "base.html" %} {%- macro actions(list) -%}
{%- for a in list or [] %} {%- if a.icon %}{{ icon(a.icon) }}{% endif %}{{ a.text }}{% if a.primary %}{{ icon('arrow-right', 'sumi-btn-arrow') }}{% endif %} {%- endfor %}
{%- endmacro -%} {%- macro code_card(code) -%}
{% if code.title %}{{ code.title }}{% endif %}
{{ ('`````' ~ (code.lang or 'text') ~ '\n' ~ code.content ~ '\n`````') | sumi_md(true) }}
{%- endmacro -%} {%- macro section_head(s) -%} {%- if s.eyebrow or s.title or s.text %}
{%- if s.eyebrow %}
{{ s.eyebrow }}
{% endif %} {%- if s.title %}

{{ s.title | sumi_md }}

{% endif %} {%- if s.text %}

{{ s.text | sumi_md }}

{% endif %}
{%- endif %} {%- endmacro -%} {% block layout %} {%- set hero = page.meta.hero or {} -%} {%- set sections = page.meta.sections or [{'type': 'content'}] -%}
{%- if hero.eyebrow %}
{{ hero.eyebrow }}
{% endif %}

{{ (hero.title or page.title or config.site_name) | sumi_md }}

{%- if hero.text or config.site_description %}

{{ (hero.text or config.site_description) | sumi_md }}

{% endif %} {{ actions(hero.actions) }} {%- if hero.install %} {%- endif %}
{%- if hero.code %}
{{ code_card(hero.code) }}
{%- elif hero.image %}
{%- endif %}
{%- for s in sections %} {%- set type = s.type or 'content' %}
{%- if type == 'content' %}
{{ page.content }}
{%- elif type == 'features' %} {{ section_head(s) }}
{%- for f in s['items'] or [] %} {%- set tag = 'a' if f.link else 'div' %} <{{ tag }} class="sumi-feature"{% if f.link %} href="{{ f.link | url }}"{% endif %}> {%- if f.icon %}{{ icon(f.icon) }}{% endif %}

{{ f.title }}

{{ f.text | sumi_md }}

{%- if f.link %}{{ f.more or '' }}{{ icon('arrow-right') }}{% endif %} {%- endfor %}
{%- elif type == 'split' %}
{{ section_head(s) }} {%- if s.bullets %}
    {% for b in s.bullets %}
  • {{ icon('check') }}{{ b | sumi_md }}
  • {% endfor %}
{%- endif %} {%- if s.actions %}{{ actions(s.actions) }}{% endif %}
{%- if s.code %}{{ code_card(s.code) }}{% elif s.image %}{% elif s.markdown %}
{{ s.markdown | sumi_md(true) }}
{% endif %}
{%- elif type == 'stats' %} {{ section_head(s) }}
{%- for st in s['items'] or [] %}
{{ st.label }}
{{ st.value }}
{% endfor %}
{%- elif type == 'steps' %} {{ section_head(s) }}
    {%- for st in s['items'] or [] %}
  1. {{ st.title }}

    {{ st.text | sumi_md(true) }}
  2. {%- endfor %}
{%- elif type == 'faq' %} {{ section_head(s) }}
{%- for f in s['items'] or [] %}
{{ f.q }}
{{ f.a | sumi_md(true) }}
{%- endfor %}
{%- elif type == 'cta' %}
{{ section_head(s) }} {{ actions(s.actions) }}
{%- endif %}
{%- endfor %}
{% endblock %}