refactor(web/blog): Configurable blog name and footer
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>
This commit is contained in:
parent
e99d8510d7
commit
bbf92dcdea
3 changed files with 29 additions and 25 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue