about summary refs log tree commit diff
path: root/users/tazjin/homepage
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/homepage')
-rw-r--r--users/tazjin/homepage/feed.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/users/tazjin/homepage/feed.nix b/users/tazjin/homepage/feed.nix
index 3c0cc06f1044..40650f678ba1 100644
--- a/users/tazjin/homepage/feed.nix
+++ b/users/tazjin/homepage/feed.nix
@@ -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" ];