We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4deb131 commit a106ee1Copy full SHA for a106ee1
tools/algolia-add-custom-attribute.ts
@@ -1,3 +1,11 @@
1
+// don't run the post-render on incremental render or preview
2
+console.log("Running post-render script for Algolia search index.");
3
+if (!Deno.env.get("QUARTO_PROJECT_RENDER_ALL")) {
4
+ console.log(" Skipping custom attribute addition for Algolia search as this is not a full render.");
5
+ Deno.exit(0);
6
+}
7
+console.log(" Adding custom attribute for Algolia search.");
8
+// This script adds a custom attribute to the Algolia search index for guides
9
const j = JSON.parse(Deno.readTextFileSync("_site/search.json"));
10
j.forEach((entry) => {
11
const crumb = entry.crumbs || [];
0 commit comments