about summary refs log tree commit diff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/blog/default.nix3
-rw-r--r--web/tvl/default.nix5
2 files changed, 7 insertions, 1 deletions
diff --git a/web/blog/default.nix b/web/blog/default.nix
index ec386a217766..2cabc09b5524 100644
--- a/web/blog/default.nix
+++ b/web/blog/default.nix
@@ -55,5 +55,8 @@ let
 in {
   inherit post toFeedEntry;
   inherit (fragments) renderPost;
+
+  # Helper function to determine whether a post should be included in
+  # listings (on homepages, feeds, ...)
   includePost = post: !(fragments.isDraft post) && !(fragments.isUnlisted post);
 }
diff --git a/web/tvl/default.nix b/web/tvl/default.nix
index 4a3688bf3177..be0981eec2af 100644
--- a/web/tvl/default.nix
+++ b/web/tvl/default.nix
@@ -3,6 +3,7 @@
 with depot.nix.yants;
 
 let
+  inherit (builtins) filter;
   inherit (pkgs) graphviz runCommandNoCC writeText;
   inherit (depot.web) atom-feed blog tvl;
 
@@ -18,6 +19,8 @@ let
     ${graphviz}/bin/neato -Tsvg ${./tvl.dot} > $out
   '';
 
+  publishedPosts = filter blog.includePost tvl.blog.posts;
+
   feed = {
     id = "https://tvl.fyi/";
     title = "TVL blog";
@@ -29,7 +32,7 @@ let
       href = "https://tvl.fyi/feed.atom";
     };
 
-    entries = map (blog.toFeedEntry tvl.blog.config) tvl.blog.posts;
+    entries = map (blog.toFeedEntry tvl.blog.config) publishedPosts;
   };
 
   atomFeed = writeText "feed.atom" (atom-feed.renderFeed feed);