Skip to content

Commit beb7c66

Browse files
committed
feat(build-docs): rewrite URLs for in-app help
1 parent 966e5a2 commit beb7c66

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

apps/edit-docs/src/edit-docs.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ async function cleanUpMeta(outputPath: string, minify: boolean) {
158158
}
159159

160160
el.isExpanded = false;
161+
162+
// Rewrite web view URLs that point to root.
163+
if (el.type === "webView" && minify) {
164+
const srcAttr = el.attributes.find(attr => attr.name === "webViewSrc");
165+
if (srcAttr.value.startsWith("/")) {
166+
srcAttr.value = "docs.triliumnotes.org" + srcAttr.value;
167+
}
168+
}
161169
}
162170

163171
if (minify) {

0 commit comments

Comments
 (0)