This commit is contained in:
Paul B. Hartzog
2026-09-09 13:09:19 -04:00
commit a4f43d526f
8 changed files with 518 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import PAGE from "./app.html";
export function handler(CARDS, TAGS, TITLE) {
const inject = "window.__CARDS__ = " + JSON.stringify(CARDS) + ";\n"
+ "window.__TAGS__ = " + JSON.stringify(TAGS) + ";";
const html = PAGE
.replace("__TITLE__", () => TITLE) // fn-form: no $-pattern interpretation
.replace("/*__DATA__*/", () => inject);
return new Response(html,
{ headers: { "content-type": "text/html; charset=utf-8" } });
}