about summary refs log tree commit diff
path: root/web/blog/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-11-02T13·34+0100
committertazjin <mail@tazj.in>2021-11-03T15·43+0000
commitbbf92dcdeaaf8bd8ab43fdd167f0709bb8840eb6 (patch)
treea5ba8f5323b144b051a2ac16868854cfd6477b22 /web/blog/default.nix
parente99d8510d7f8d47cbf6217b2b6c7cd64d9457570 (diff)
refactor(web/blog): Configurable blog name and footer r/2998
Required for actually using this generically for the TVL blog.

Change-Id: I92d8d10341f9ab4f92c90f7976be261b3255a0f0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3768
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'web/blog/default.nix')
-rw-r--r--web/blog/default.nix8
1 files changed, 3 insertions, 5 deletions
diff --git a/web/blog/default.nix b/web/blog/default.nix
index 05367588e3fb..a93762dfea12 100644
--- a/web/blog/default.nix
+++ b/web/blog/default.nix
@@ -9,7 +9,7 @@ with depot.nix.yants;
 let
   # Type definition for a single blog post.
   post = struct "blog-post" {
-    key = string; #
+    key = string;
     title = string;
     date = int;
 
@@ -31,11 +31,9 @@ let
     oldKey = option string;
   };
 
-  posts = list post (import ./posts.nix);
   fragments = import ./fragments.nix args;
-
-  includePost = post: !(fragments.isDraft post) && !(fragments.isUnlisted post);
 in {
-  inherit post includePost;
+  inherit post;
   inherit (fragments) renderPost;
+  includePost = post: !(fragments.isDraft post) && !(fragments.isUnlisted post);
 }