commit a1602efd8047b1b0e6718e8454e27e8d257efa6e
parent 250c8cf14f2a1b0dc063ecea97b61e0122f0b4c2
Author: Frederic Cambus <fred@statdns.com>
Date: Mon, 24 Apr 2017 18:48:28 +0200
Posts archive page is now a normal page
Diffstat:
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/motyl.lua b/src/motyl.lua
@@ -73,7 +73,6 @@ data.site = loadYAML("motyl.conf")
-- Loading templates
local templates = {
header = readFile("themes/templates/header.mustache"),
- archives = readFile("themes/templates/archives.mustache"),
atom = readFile("themes/templates/atom.mustache"),
pages = readFile("themes/templates/page.mustache"),
posts = readFile("themes/templates/post.mustache"),
@@ -127,18 +126,15 @@ local function render(directory)
end
end
--- Render posts and pages
+-- Render posts
lfs.mkdir("deploy")
render("posts")
-render("pages")
--- Index
+-- Sort post archives
table.sort(data.site.posts, sortDates)
-data.page.title = "Archives"
-lfs.mkdir("deploy/archives")
-writeFile("deploy/archives/index.html", renderTemplate(templates.archives, data, templates))
-status("Rendering archives/")
+-- Renger pages
+render("pages")
-- Feed
for loop=1, 20 do