motyl

Opinionated blog-aware static site generator written in Ruby
Log | Files | Refs | README | LICENSE

commit e9dce499b40e3a8ac8cafd2834bcfbc449d14bae
parent 68d47b3ca21fd3ac7c33dc30af35577f45ec92af
Author: Frederic Cambus <fred@statdns.com>
Date:   Sat,  5 Mar 2016 00:30:47 +0100

Converting post dates into default UNIX date format

Diffstat:
Mmotyl.lua | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/motyl.lua b/motyl.lua @@ -89,6 +89,9 @@ local function render(directory) status("Rendering " .. data.page.url) if directory == "posts" then + local year, month, day, hour, min = data.page.date:match("(%d+)%-(%d+)%-(%d+) (%d+)%:(%d+)") + data.page.datetime = os.date("%c", os.time{year=year, month=month, day=day, hour=hour, min=min}) + table.insert(data.site.posts, data.page) data.page.categoryDisplay = {}