diff --git a/web/tvl/template/default.nix b/web/tvl/template/default.nix
index a48003de8..9d5c8101c 100644
--- a/web/tvl/template/default.nix
+++ b/web/tvl/template/default.nix
@@ -11,30 +11,34 @@
}@args:
let
- inherit (pkgs) writeText lib;
+ inherit (pkgs) runCommandNoCC lib;
+ inherit (depot.tools) cheddar;
baseUrl = lib.optionalString useUrls "https://tvl.fyi";
in
-writeText "index.html" (''
-
-
-
-
-
-
-
- ${title}
-'' + lib.optionalString (args ? extraHead) extraHead + ''
-
-
-
+runCommandNoCC "index.html" {
+ headerPart = ''
+
+
+
+
+
+
+
+ ${title}
+ '' + lib.optionalString (args ? extraHead) extraHead + ''
+
+
+
+ '';
- ${content}
+ inherit content;
+ footerPart = ''
-'')
+ '';
+
+ passAsFile = [ "headerPart" "content" "footerPart" ];
+} ''
+ ${cheddar}/bin/cheddar --about-filter content.md < $contentPath > rendered.html
+ cat $headerPartPath rendered.html $footerPartPath > $out
+''