summary refs log tree commit diff stats
path: root/src/views
diff options
context:
space:
mode:
authorAlan Pearce2017-06-19 21:19:02 +0200
committerAlan Pearce2017-06-19 21:19:02 +0200
commit4d6378483d46806d0006d6e5755e0eedd6372154 (patch)
treebde43ff429ecbab1902cca54dd04a74a5cdbb58b /src/views
parentacd2fe16e6323fdf6b6a10f05603c94b3a535fd7 (diff)
downloadhomestead-4d6378483d46806d0006d6e5755e0eedd6372154.tar.lz
homestead-4d6378483d46806d0006d6e5755e0eedd6372154.tar.zst
homestead-4d6378483d46806d0006d6e5755e0eedd6372154.zip
feat: add link helper to view globals
Diffstat (limited to 'src/views')
-rw-r--r--src/views/index.njk6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/views/index.njk b/src/views/index.njk
index e5f4034..9a7cc80 100644
--- a/src/views/index.njk
+++ b/src/views/index.njk
@@ -6,7 +6,11 @@
 
   <ul>
     {% for filename, post in posts %}
-      <li>{{ post.data.get('title') }}</li>
+      <li>
+        <a href="{{ router.url('post', post.basename)}}">
+          {{ post.data.get('title') }}
+        </a>
+      </li>
     {% endfor %}
   </ul>