diff options
author | William Carroll <wpcarro@gmail.com> | 2021-12-28T00·17-0400 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2021-12-28T00·20+0000 |
commit | c05c6920ee4d15d5d32e1294319b68091bb7af3b (patch) | |
tree | 44f29fe19fdd8b119f49918d4e4a7f9a38ace09b /users/wpcarro/website | |
parent | e107311cb87fc219889f37f0c67cfea22b4a99e7 (diff) |
fix(wpcarro/blog): Fix broken post links r/3484
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
Diffstat (limited to '')
-rw-r--r-- | users/wpcarro/website/blog/default.nix | 15 | ||||
-rw-r--r-- | users/wpcarro/website/default.nix | 2 |
2 files changed, 7 insertions, 10 deletions
diff --git a/users/wpcarro/website/blog/default.nix b/users/wpcarro/website/blog/default.nix index 713c42a83b33..7056b026a21a 100644 --- a/users/wpcarro/website/blog/default.nix +++ b/users/wpcarro/website/blog/default.nix @@ -34,15 +34,12 @@ let toPostHtml = post: readFile (pkgs.substituteAll { src = ./fragments/post.html; - postUrl = "${config.baseUrl}/${post.key}.html"; + postUrl = "${config.baseUrl}/posts/${post.key}.html"; postTitle = post.title; postDate = formatDate post.date; }); -in { - inherit posts rendered config; - - root = pkgs.runCommandNoCC "wpcarros-blog" {} '' - mkdir -p $out - cp ${wpcarro.website.render postsHtml} $out/index.html - ''; -} +in pkgs.runCommandNoCC "wpcarros-blog" {} '' + mkdir -p $out + cp ${wpcarro.website.render postsHtml} $out/index.html + cp -r ${rendered} $out/posts +'' diff --git a/users/wpcarro/website/default.nix b/users/wpcarro/website/default.nix index e8f2161792ca..b20de562ab6f 100644 --- a/users/wpcarro/website/default.nix +++ b/users/wpcarro/website/default.nix @@ -22,6 +22,6 @@ in { cp -r ${wpcarro.website.habit-screens} $out/habits/index.html # /blog - cp -r ${wpcarro.website.blog.root} $out/blog + cp -r ${wpcarro.website.blog} $out/blog ''; } |