fix(docs): clarify Hyper Licensing

This commit is contained in:
alam00000 committed 2026-10-27 13:23:08 +05:30
1 parent 7abb219565
commit 1a6b38c077
57 files changed
+734 -80

No files matched your search

+10 -9
View File
@@ -366,16 +366,17 @@ function processFileForLanguage(
}
if (docsLanguages.includes(lang)) {
const localDocs = `${BASE_PATH}/docs`;
document.querySelectorAll('a[href]').forEach((link) => {
const href = link.getAttribute('href');
if (
href === OFFICIAL_DOCS_URL ||
href?.startsWith(`${OFFICIAL_DOCS_URL}/`)
) {
link.setAttribute(
'href',
href.replace(OFFICIAL_DOCS_URL, `${OFFICIAL_DOCS_URL}/${lang}`)
);
for (const docsUrl of [OFFICIAL_DOCS_URL, localDocs]) {
if (href === docsUrl || href?.startsWith(`${docsUrl}/`)) {
link.setAttribute(
'href',
href.replace(docsUrl, `${docsUrl}/${lang}`)
);
break;
}
}
});
}
@@ -404,7 +405,7 @@ function processFileForLanguage(
BASE_PATH && href.startsWith(`${BASE_PATH}/`)
? href.slice(BASE_PATH.length)
: href;
if (hrefWithoutBase === '/blog' || hrefWithoutBase.startsWith('/blog/')) {
if (/^\/(blog|docs)(\/|$)/.test(hrefWithoutBase)) {
return;
}