fix(web/tvl/blog): Include only published posts in listings & feed

Change-Id: I76c9c2c5cc82c7d0f59f907b6f1abee92a92cbf7
This commit is contained in:
Vincent Ambo 2021-12-01 12:32:53 +03:00
parent c725f89d8b
commit 79681c9e21
2 changed files with 7 additions and 1 deletions

View file

@ -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);
}