diff --git a/web/blog/default.nix b/web/blog/default.nix
index bc7b9666f..1bc026bf2 100644
--- a/web/blog/default.nix
+++ b/web/blog/default.nix
@@ -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;
})
diff --git a/web/blog/fragments.nix b/web/blog/fragments.nix
index 2c9127b7f..4af642c01 100644
--- a/web/blog/fragments.nix
+++ b/web/blog/fragments.nix
@@ -51,9 +51,13 @@ let
renderPost = post: runCommandNoCC "${post.key}.html" {} ''
cat ${toFile "header.html" (header post.title)} > $out
- # Write the actual post
+ # Write the post title & date
echo '${escape post.title}
' >> $out
- echo '' >> $out
+ echo '' >> $out
+
+ # Write the actual post through cheddar's about-filter mechanism
cat ${post.content} | ${pkgs.tools.cheddar}/bin/cheddar --about-filter ${post.content} >> $out
echo '' >> $out
diff --git a/web/blog/posts.nix b/web/blog/posts.nix
index e6fb821f9..164ffa142 100644
--- a/web/blog/posts.nix
+++ b/web/blog/posts.nix
@@ -3,35 +3,35 @@
{
key = "reversing-watchguard-vpn";
title = "Reverse-engineering WatchGuard Mobile VPN";
- date = "2017-02-11";
+ date = 1486830338;
content = ./posts/reversing-watchguard-vpn.md;
oldKey = "1486830338";
}
{
key = "make-object-t-again";
title = "Make Object Again!";
- date = "2016-10-18";
+ date = 1476807384;
content = ./posts/make-object-t-again.md;
oldKey = "1476807384";
}
{
key = "the-smu-problem";
title = "The SMU-problem of messaging apps";
- date = "2015-12-17";
+ date = 1450354078;
content =./posts/the-smu-problem.md;
oldKey = "1450354078";
}
{
key = "sick-in-sweden";
title = "Being sick in Sweden";
- date = "2015-02-15";
+ date = 1423995834;
content = ./posts/sick-in-sweden.md;
oldKey = "1423995834";
}
{
key = "nsa-zettabytes";
title = "The NSA's 5 zettabytes of data";
- date = "2013-07-31";
+ date = 1375310627;
content = ./posts/nsa-zettabytes.md;
oldKey = "1375310627";
}