aboutsummaryrefslogtreecommitdiff
path: root/templates/macros/create_stork_toml.html
blob: 642b3f949446178605159ecef66c63dfeb840d28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{%- macro from_section(section) -%}
{%- set section = get_section(path=section) -%}
{%- for post in section.pages -%}
{%- if not post.draft %}    {path = {{ '.' ~ post.path ~ 'index.html' | json_encode | safe }}, url = {{ post.permalink | json_encode | safe }}, title = {{ post.title | striptags | json_encode | safe }}}
{%- if not loop.last -%},
{% endif -%}
{%- endif -%}
{%- endfor -%}
{%- if section.subsections -%},
{% for subsection in section.subsections -%}
{{ self::from_section(section=subsection) }}
{%- endfor -%}
{%- endif -%}
{%- endmacro from_section -%}