From ec1167155d1a2e92a04c31e66d0f244751d4286d Mon Sep 17 00:00:00 2001 From: Bauke Date: Sun, 1 Mar 2020 00:49:56 +0100 Subject: [PATCH] Add published date metadata to posts. --- source/pages/templates/post.html | 4 ++++ source/scripts/html.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/source/pages/templates/post.html b/source/pages/templates/post.html index 9eade21..960d6c8 100644 --- a/source/pages/templates/post.html +++ b/source/pages/templates/post.html @@ -3,6 +3,10 @@ {% extends "base.html" %} +{% block head %} + +{% endblock %} + {% block body %}
diff --git a/source/scripts/html.ts b/source/scripts/html.ts index 547e507..d228d70 100644 --- a/source/scripts/html.ts +++ b/source/scripts/html.ts @@ -136,6 +136,7 @@ async function entry(): Promise { year: Number(year) }, pluralize, + publishedDate: new Date(Number(year), monthNumber, 0, 12, 0, 0), statistic } );