diff options
author | Vincent Ambo <mail@tazj.in> | 2021-04-02T13·35+0200 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-04-02T13·44+0000 |
commit | 4450003bd7385a29a28f83f3f7a3d2f57615e9ff (patch) | |
tree | aa81e6697ab67ea610e852f98b855176fe68a180 /users/tazjin/atom-feed | |
parent | 817cd6f166af88b73ff7b80e7e70a0689951f731 (diff) |
feat(tazjin/blog): Add distinction between published & updated times r/2402
Fixes a long-standing todo by adding an additional field for the time at which a post was updated, and handling this in both site generation (to note the update date after the publish date) and in Atom feed generation (by populating both the updated and published fields). Change-Id: If80db43459b2a0c77eea4dde7255651b5d6cd64b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2766 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/atom-feed')
-rw-r--r-- | users/tazjin/atom-feed/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/users/tazjin/atom-feed/default.nix b/users/tazjin/atom-feed/default.nix index cd189b86754d..fe5e4b997c0a 100644 --- a/users/tazjin/atom-feed/default.nix +++ b/users/tazjin/atom-feed/default.nix @@ -111,6 +111,10 @@ let ${elem "title" e.title} ${elem "id" e.id} ${elem "updated" (renderEpoch e.updated)} + ${if e ? published + then elem "published" (renderEpoch e.published) + else "" + } ${if e ? content then ''<content type="html">${escape e.content}</content>'' else "" |