about summary refs log tree commit diff
path: root/users/tazjin/blog/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-11-05T13·19+0100
committertazjin <mail@tazj.in>2021-11-08T10·39+0000
commit875ef0a605c298e3033ef950119092d09e21f306 (patch)
treed81aaa06061953fad90a5b8f165cd31d023c5eb9 /users/tazjin/blog/default.nix
parentbb980158a785b0ce23d25fa0f74c996311df7a67 (diff)
fix(web/blog): make base URL configurable for atom feeds r/3025
This was previously hardcoded to tazj.in, which is not going to work
of course.

Instead it now takes the blog config which has a new baseUrl
parameter. For ease of use, the configs of my and the TVL blog have
been moved into a location that is accessible in the tree for reuse.

Change-Id: I94e71aaa7859db4380eb7013740a17f6b6a02620
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3777
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'users/tazjin/blog/default.nix')
-rw-r--r--users/tazjin/blog/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/users/tazjin/blog/default.nix b/users/tazjin/blog/default.nix
index c65b5cb50bf0..6ac89e46656a 100644
--- a/users/tazjin/blog/default.nix
+++ b/users/tazjin/blog/default.nix
@@ -5,8 +5,9 @@ with depot.nix.yants;
 let
   inherit (builtins) hasAttr filter;
 
-  blogConfig = {
+  config = {
     name = "tazjin's blog";
+    baseUrl = "https://tazj.in/blog";
 
     footer = ''
       <p class="footer">
@@ -26,12 +27,12 @@ let
     mkdir -p $out
 
     ${lib.concatStringsSep "\n" (map (post:
-      "cp ${renderPost blogConfig post} $out/${post.key}.html"
+      "cp ${renderPost config post} $out/${post.key}.html"
     ) posts)}
   '';
 
 in {
-  inherit posts rendered;
+  inherit posts rendered config;
 
   # Generate embeddable nginx configuration for redirects from old post URLs
   oldRedirects = lib.concatStringsSep "\n" (map (post: ''