diff options
Diffstat (limited to 'templates/index.html')
-rw-r--r-- | templates/index.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/index.html b/templates/index.html index 94fe80f..2130278 100644 --- a/templates/index.html +++ b/templates/index.html @@ -32,11 +32,13 @@ <nav> <h1>{{ macros::nav_item(name=config.title, url=config.base_url) }}</h1> <ul> - {%- set root = get_section(path="_index.md") %} - {%- for p in root.pages -%} + {% set root = get_section(path="_index.md") %} + {% set pages = root.pages | sort(attribute="title") %} + {% for p in pages %} <li>{{ macros::nav_item(name=p.title,url=p.permalink) }}</li> {%- endfor -%} - {% for p in root.subsections %} + {% set subsections = root.subsections | sort %} + {% for p in subsections %} {%- set s = get_section(path=p) %} <li>{{ macros::nav_item(name=s.title,url=s.permalink) }}</li> {% endfor %} |