Skip to content

Commit 8fb5ece

Browse files
committed
chore: quick fix for 7.x docs build
1 parent fd40799 commit 8fb5ece

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/generateSearch.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,11 @@ async function run() {
141141
}
142142
content.url = url;
143143
} else {
144-
const url = content.url.startsWith('/') ? content.url : `/${content.url}`;
145-
content.url = `/docs/${version}/docs${url}`;
144+
let url = content.url.startsWith('/') ? content.url : `/${content.url}`;
145+
if (!url.startsWith('/docs')) {
146+
url = '/docs' + url;
147+
}
148+
content.url = `/docs/${version}${url}`;
146149
}
147150
console.log(`${++count} / ${contents.length}`);
148151
await content.save();

0 commit comments

Comments
 (0)