diff options
author | Vincent Ambo <mail@tazj.in> | 2021-11-02T13·34+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-11-03T15·43+0000 |
commit | bbf92dcdeaaf8bd8ab43fdd167f0709bb8840eb6 (patch) | |
tree | a5ba8f5323b144b051a2ac16868854cfd6477b22 /web/blog/default.nix | |
parent | e99d8510d7f8d47cbf6217b2b6c7cd64d9457570 (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.nix | 8 |
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); } |