diff options
Diffstat (limited to 'templates/macros/create_stork_toml.html')
| -rw-r--r-- | templates/macros/create_stork_toml.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/macros/create_stork_toml.html b/templates/macros/create_stork_toml.html index 642b3f9..f754e2e 100644 --- a/templates/macros/create_stork_toml.html +++ b/templates/macros/create_stork_toml.html @@ -2,13 +2,14 @@ {%- 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 }}} +{%- set found = true -%} {%- if not loop.last -%}, {% endif -%} {%- endif -%} {%- endfor -%} -{%- if section.subsections -%}, +{%- if found -%}{%- if section.subsections -%}, {% for subsection in section.subsections -%} {{ self::from_section(section=subsection) }} {%- endfor -%} -{%- endif -%} +{%- endif -%}{%- endif -%} {%- endmacro from_section -%}
\ No newline at end of file |
