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:
parent
bae8e8d26c
commit
50e79b2d04
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue