src/views/index.njk (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{% extends "layouts/main.njk" %} {% block body %} <h1>hello world</h1> <ul> {% for filename, post in posts %} <li> <a href="{{ router.url('post', post.basename)}}"> {{ post.data.get('title') }} </a> </li> {% endfor %} </ul> {% endblock %}