fix: use absolute paths for i18n links to prevent URL duplication
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -36,3 +36,6 @@ libreoffice-wasm-package
|
|||||||
|
|
||||||
# helm chart
|
# helm chart
|
||||||
bentopdf-*.tgz
|
bentopdf-*.tgz
|
||||||
|
|
||||||
|
# test
|
||||||
|
dist-test
|
||||||
@@ -173,7 +173,7 @@ async function generateI18nPages() {
|
|||||||
: href;
|
: href;
|
||||||
newHref = `${BASE_PATH}/${lang}${pathWithoutBase}`;
|
newHref = `${BASE_PATH}/${lang}${pathWithoutBase}`;
|
||||||
} else {
|
} else {
|
||||||
newHref = `${lang}/${href}`;
|
newHref = `${BASE_PATH}/${lang}/${href}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
link.setAttribute('href', newHref);
|
link.setAttribute('href', newHref);
|
||||||
|
|||||||
Reference in New Issue
Block a user