From 74eefd84e01b5a579e8c3775f5094a24d6c91a98 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 12 Nov 2017 19:11:17 +0100 Subject: [PATCH] fix post lists --- site/index.md | 2 +- src/Main.hs | 2 +- templates/{archive.md => archive.html} | 3 ++- templates/default.html | 2 +- templates/post-list.html | 5 +++++ templates/post-list.md | 3 --- 6 files changed, 10 insertions(+), 7 deletions(-) rename templates/{archive.md => archive.html} (51%) create mode 100644 templates/post-list.html delete mode 100644 templates/post-list.md diff --git a/site/index.md b/site/index.md index 943c3ed..74b98f5 100644 --- a/site/index.md +++ b/site/index.md @@ -12,6 +12,6 @@ welcome. Meet us at our Assembly at 34C3. The latest posts here are: -$partial("templates/post-list.md")$ +$partial("templates/post-list.html")$ and there are even more in the [archive](/archive.html). diff --git a/src/Main.hs b/src/Main.hs index 5b0739a..4d9fb61 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -81,7 +81,7 @@ main = do -- (menuCtx firstUrl latestUrl) defaultCtx makeItem "" - >>= loadAndApplyTemplate "templates/archive.md" archiveCtx + >>= loadAndApplyTemplate "templates/archive.html" archiveCtx >>= loadAndApplyTemplate "templates/default.html" archiveCtx >>= relativizeUrls diff --git a/templates/archive.md b/templates/archive.html similarity index 51% rename from templates/archive.md rename to templates/archive.html index 90393ed..625725e 100644 --- a/templates/archive.md +++ b/templates/archive.html @@ -1,2 +1,3 @@ Here you can find all my previous posts: -$partial("templates/post-list.md")$ + +$partial("templates/post-list.html")$ diff --git a/templates/default.html b/templates/default.html index d5a97de..b0efadf 100644 --- a/templates/default.html +++ b/templates/default.html @@ -28,7 +28,7 @@

$title$

- $body$ +$body$
diff --git a/templates/post-list.html b/templates/post-list.html new file mode 100644 index 0000000..97ea85e --- /dev/null +++ b/templates/post-list.html @@ -0,0 +1,5 @@ + diff --git a/templates/post-list.md b/templates/post-list.md deleted file mode 100644 index 3650488..0000000 --- a/templates/post-list.md +++ /dev/null @@ -1,3 +0,0 @@ -$for(posts)$ -* [$title$]($url$) - $date$ -$endfor$