refactor(web/blog): Use timestamps for dates instead of strings

This lets me easily create an ordered list of entries if the homepage
is designed to list both blog posts and other content.
This commit is contained in:
Vincent Ambo 2020-02-08 13:47:47 +00:00
parent cc2c130352
commit 8e9fb73958
3 changed files with 13 additions and 10 deletions

View file

@ -11,7 +11,7 @@ let
post = struct "blog-post" {
key = string; #
title = string;
date = string; # *sigh*
date = int;
# Path to the Markdown file containing the post content.
content = path;
@ -39,8 +39,7 @@ let
${lib.concatStringsSep "\n" (map (post:
"cp ${fragments.renderPost post} $out/${post.key}.html"
) posts)}
''; # '' (this line makes nix-mode happy :/)
'';
in import ./nginx.nix (args // {
inherit posts renderedBlog;
})