diff options
author | Vincent Ambo <mail@tazj.in> | 2021-12-01T09·32+0300 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2021-12-01T09·37+0300 |
commit | 79681c9e219c8dd2cc6690b78fce6bb48dcd10e1 (patch) | |
tree | 72ae3caa83ab33ded3794e7de0ce70cf57d9008d /web/blog | |
parent | c725f89d8b4ec6b1fb4e396c808e2d8c4e236747 (diff) |
fix(web/tvl/blog): Include only published posts in listings & feed r/3123
Change-Id: I76c9c2c5cc82c7d0f59f907b6f1abee92a92cbf7
Diffstat (limited to 'web/blog')
-rw-r--r-- | web/blog/default.nix | 3 |
1 files changed, 3 insertions, 0 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); } |