chore(build-docs): fix URL

This commit is contained in:
Elian Doran
2025-11-02 20:10:58 +02:00
parent 6bc54892a3
commit 5171675dee
2 changed files with 4 additions and 2 deletions

View File

@@ -23,6 +23,8 @@ if (!DOCS_ROOT || !USER_GUIDE_ROOT) {
throw new Error("Missing DOCS_ROOT or USER_GUIDE_ROOT environment variable.");
}
const BASE_URL = "https://docs.triliumnotes.org";
const NOTE_MAPPINGS: NoteMapping[] = [
{
rootNoteId: "pOsGYCXsbNQG",
@@ -163,7 +165,7 @@ async function cleanUpMeta(outputPath: string, minify: boolean) {
if (el.type === "webView" && minify) {
const srcAttr = el.attributes.find(attr => attr.name === "webViewSrc");
if (srcAttr.value.startsWith("/")) {
srcAttr.value = "docs.triliumnotes.org" + srcAttr.value;
srcAttr.value = BASE_URL + srcAttr.value;
}
}
}