1
0

Generate navigation from config

This commit is contained in:
Emil Miler 2021-12-02 11:13:36 +01:00
parent 21f1f15e42
commit b3a77181ef
2 changed files with 10 additions and 3 deletions

View File

@ -5,3 +5,10 @@ build_search_index = false
[markdown] [markdown]
highlight_code = false highlight_code = false
[extra]
nav = [
{title = "Index", path = "/"},
{title = "About", path = "/about/"},
{title = "All posts", path = "/posts/"}
]

View File

@ -11,9 +11,9 @@
</header> </header>
<aside> <aside>
<ul> <ul>
<li><a href="">anchor</a></li> {% for item in config.extra.nav %}
<li><a href="">anchor</a></li> <li><a href="{{ item.path }}">{{ item.title }}</a></li>
<li><a href="">anchor</a></li> {% endfor %}
</ul> </ul>
<span class="title">Title</span> <span class="title">Title</span>
<ul> <ul>