fix(tazjin/homepage): Use most recent entry update time for feed
This drops the annoying usage of builtins.currenTime, which means that my website stops constantly rebuilding. Change-Id: I44294b06588673846f473beb6533a5fa3410a1bd Reviewed-on: https://cl.tvl.fyi/c/depot/+/2767 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
This commit is contained in:
parent
4450003bd7
commit
dc9a1754d5
1 changed files with 5 additions and 4 deletions
|
@ -4,8 +4,8 @@
|
|||
with depot.nix.yants;
|
||||
|
||||
let
|
||||
inherit (builtins) map readFile sort;
|
||||
inherit (lib) singleton;
|
||||
inherit (builtins) map readFile sort foldl';
|
||||
inherit (lib) max singleton;
|
||||
inherit (pkgs) writeText;
|
||||
inherit (depot.users.tazjin) atom-feed blog renderMarkdown;
|
||||
|
||||
|
@ -37,12 +37,13 @@ let
|
|||
|
||||
allEntries = (map postToEntry blog.posts) ++ (map pageEntryToEntry pageEntries);
|
||||
|
||||
mostRecentlyUpdated = foldl' max 0 (map (e: e.updated) allEntries);
|
||||
|
||||
feed = {
|
||||
id = "https://tazj.in/";
|
||||
title = "tazjin's interblag";
|
||||
subtitle = "my posts, projects and other interesting things";
|
||||
# TODO(tazjin): Take the most recently updated entry time instead.
|
||||
updated = builtins.currentTime;
|
||||
updated = mostRecentlyUpdated;
|
||||
rights = "© 2020 tazjin";
|
||||
authors = [ "tazjin" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue