Changed website manual navigation

This commit is contained in:
Marc Froehlich
2026-08-06 00:46:00 +02:00
parent 259d0a4916
commit c682ecf3f9
+10 -8
View File
@@ -97,15 +97,17 @@ function rewriteManualLinks(content, lang) {
return `[${label}](/manual/${linkLang}/${slug.toLowerCase()}/)`; return `[${label}](/manual/${linkLang}/${slug.toLowerCase()}/)`;
}) })
// Markdown-Links auf de-/en-Dateien ohne .md // Markdown links to German or English manual pages.
.replace(/\]\((en|de)-([^)#]+)\)/g, (match, linkLang, slug) => { // The source may contain an optional ".md" suffix and an optional anchor.
return `](/manual/${linkLang}/${slug.toLowerCase()}/)`; // Both forms must be converted to the corresponding website manual URL.
}) .replace(
/\]\((en|de)-([^#)]+?)(?:\.md)?(?:#([^)]+))?\)/g,
(match, linkLang, slug, anchor) => {
const fragment = anchor ? `#${anchor}` : "";
// Markdown-Links auf de-/en-Dateien mit .md return `](/manual/${linkLang}/${slug.toLowerCase()}/${fragment})`;
.replace(/\]\((en|de)-([^)#]+)\.md\)/g, (match, linkLang, slug) => { }
return `](/manual/${linkLang}/${slug.toLowerCase()}/)`; );
});
} }
module.exports = function (eleventyConfig) { module.exports = function (eleventyConfig) {