Skip to content

Commit aef4c7b

Browse files
committedDec 28, 2022
docs: quick fix for search re: #12830
1 parent 48179b4 commit aef4c7b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎docs/search.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,13 @@ async function run() {
121121

122122
await Content.deleteMany({ version });
123123
for (const content of contents) {
124-
if (version !== '6.x') {
124+
if (version === '6.x') {
125+
let url = content.url.startsWith('/') ? content.url : `/${content.url}`;
126+
if (!url.startsWith('/docs')) {
127+
url = '/docs' + url;
128+
}
129+
content.url = url;
130+
} else {
125131
const url = content.url.startsWith('/') ? content.url : `/${content.url}`;
126132
content.url = `/docs/${version}/docs${url}`;
127133
}

0 commit comments

Comments
 (0)
Please sign in to comment.