mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-09 09:04:18 +01:00
fix(docs): clarify Hyper Licensing
This commit is contained in:
1 parent
7abb219565
commit
1a6b38c077
57 files changed
+734
-80
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user