]> Lady’s Gitweb - Blog/blobdiff - build.js
Linkify blog title
[Blog] / build.js
index a3e7630d8dca71268c42f3469aee2e983f139ace..e3f78dddeb30559a20ae1be74f333d07601d9b9d 100755 (executable)
--- a/build.js
+++ b/build.js
@@ -61,6 +61,19 @@ globalThis.bjørnTransformMetadata = (metadata, _type) => {
   processContent(metadata.summary);
 };
 
+globalThis.bjørnTransformFeedHTML = (document, _metadata) => {
+  const LMN = Lemon.bind({ document });
+  const h1 = document.getElementsByTagNameNS(
+    "http://www.w3.org/1999/xhtml",
+    "h1",
+  )[0];
+  const link = LMN.a.href("/")``;
+  for (const child of Array.from(h1.childNodes)) {
+    link.appendChild(child);
+  }
+  h1.appendChild(link);
+};
+
 await import(
   "https://git.ladys.computer/Beorn/blob_plain/0.2.3:/build.js"
 );
This page took 0.022423 seconds and 4 git commands to generate.