about summary refs log tree commit diff
path: root/web/blog/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'web/blog/default.nix')
-rw-r--r--web/blog/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/web/blog/default.nix b/web/blog/default.nix
index 73b1bc20e3e7..5f97c00bc985 100644
--- a/web/blog/default.nix
+++ b/web/blog/default.nix
@@ -7,6 +7,8 @@
 with pkgs.nix.yants;
 
 let
+  inherit (builtins) filter;
+
   # Type definition for a single blog post.
   post = struct "blog-post" {
     key = string; #
@@ -38,7 +40,12 @@ let
       "cp ${fragments.renderPost post} $out/${post.key}.html"
     ) posts)}
   '';
+
+  includePost = post: !(fragments.isDraft post) && !(fragments.isUnlisted post);
 in {
-  inherit post posts rendered;
+  inherit post rendered;
   static = ./static;
+
+  # Only include listed posts
+  posts = filter includePost posts;
 }