Skip to content

Commit

Permalink
docs: quick fix for search re: #12830
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Dec 28, 2022
1 parent 48179b4 commit aef4c7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/search.js
Expand Up @@ -121,7 +121,13 @@ async function run() {

await Content.deleteMany({ version });
for (const content of contents) {
if (version !== '6.x') {
if (version === '6.x') {
let url = content.url.startsWith('/') ? content.url : `/${content.url}`;
if (!url.startsWith('/docs')) {
url = '/docs' + url;
}
content.url = url;
} else {
const url = content.url.startsWith('/') ? content.url : `/${content.url}`;
content.url = `/docs/${version}/docs${url}`;
}
Expand Down

0 comments on commit aef4c7b

Please sign in to comment.