]> Lady’s Gitweb - GitWikiWeb/commitdiff
Also render the AST for debugging
authorLady <redacted>
Sat, 29 Jul 2023 06:50:35 +0000 (23:50 -0700)
committerLady <redacted>
Sat, 29 Jul 2023 06:53:19 +0000 (23:53 -0700)
build.js

index b50fe3d4c2c83da96c1eb154d806443e8a7a1d16..b69e9861eeb021d2ca967a78c433ab364e2a0354 100644 (file)
--- a/build.js
+++ b/build.js
@@ -921,6 +921,7 @@ class GitWikiWebPage {
           },
         };
       });
+      const renderedAST = djot.renderAST(ast);
       const doc = getDOM(template);
       const result = getDOM(`${djot.renderHTML(ast)}`);
       const headElement = domutils.findOne(
@@ -979,6 +980,13 @@ class GitWikiWebPage {
           { createNew: true },
         ),
       );
+      promises.push(
+        Deno.writeTextFile(
+          `${DESTINATION}/${pageRef}/index.ast`,
+          renderedAST,
+          { createNew: true },
+        ),
+      );
       promises.push(
         Deno.writeTextFile(
           `${DESTINATION}/${pageRef}/source.djot`,
This page took 0.02247 seconds and 4 git commands to generate.