tvl-depot/users/wpcarro/website/default.nix
William Carroll c05c6920ee fix(wpcarro/blog): Fix broken post links
TL;DR:
- copy rendered posts to $out/posts
- update postUrl attr
- remove unused attrs

Change-Id: I027c20d6244e4626128788ad9aa1f1aad7855f32
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4723
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
2021-12-28 00:20:38 +00:00

27 lines
545 B
Nix

{ pkgs, depot, ... }:
let
inherit (builtins) readFile;
inherit (depot.users) wpcarro;
render = contentHtml: pkgs.substituteAll {
inherit contentHtml;
src = ./fragments/template.html;
};
in {
inherit render;
root = pkgs.runCommandNoCC "wpcarro.dev" {} ''
mkdir -p $out
# /
cp ${render (readFile ./fragments/homepage.html)} $out/index.html
# /habits
mkdir -p $out/habits
cp -r ${wpcarro.website.habit-screens} $out/habits/index.html
# /blog
cp -r ${wpcarro.website.blog} $out/blog
'';
}