Genereate menu from config

master
Emil Miler 4 years ago
parent 50ca3b56d0
commit 37cf878c32

@ -8,3 +8,7 @@ description = ""
default_language = "en" default_language = "en"
[extra] [extra]
nav = [
{title = "Index", path = "/"},
{title = "About", path = "/about/"}
]

@ -23,3 +23,8 @@ header {
font-weight: bold; font-weight: bold;
font-size: 1.5em; font-size: 1.5em;
} }
aside ul {
list-style-type: none;
padding: 0;
}

@ -14,6 +14,11 @@
{{ config.title }} {{ config.title }}
</header> </header>
<aside> <aside>
<ul>
{% for item in config.extra.nav %}
<li><a href="{{ item.path }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
</aside> </aside>
<main> <main>
{% block content %} {% block content %}

Loading…
Cancel
Save