fix(wpcarro/blog): Sort blog posts by date DESC

Show the most recently published blog posts first.

Change-Id: Iacc9b2964552e8c0327a05a85c4fc5cbc8741f09
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4833
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
This commit is contained in:
William Carroll 2022-01-08 19:09:48 -08:00 committed by clbot
parent bae8e8d26c
commit 50e79b2d04

View file

@ -6,6 +6,7 @@ let
inherit (builtins) hasAttr filter readFile;
inherit (depot.web.blog) post includePost renderPost;
inherit (depot.users.wpcarro.website) domain renderTemplate withBrand;
inherit (lib.lists) sort;
config = {
name = "bill and his blog";
@ -13,7 +14,8 @@ let
footer = "";
};
posts = filter includePost (list post (import ./posts.nix));
posts = sort (x: y: x.date > y.date)
(filter includePost (list post (import ./posts.nix)));
rendered = pkgs.runCommandNoCC "blog-posts" {} ''
mkdir -p $out