feat: rewrite deprecated internal links with .html extension
This commit is contained in:
committed by
Mathias Schopmans
parent
6dbcd45a52
commit
3f79b6264e
@@ -37,6 +37,9 @@ function dataPath(...paths: string[]): string {
|
||||
}
|
||||
|
||||
function convertToHtml(markdown: string): string {
|
||||
// replace deprecated internal links with .html extension
|
||||
markdown = markdown.replace(/(]\(\/[^)]+)\.html/g, "$1/");
|
||||
|
||||
if (nextConfig.basePath) {
|
||||
markdown = markdown.replace(/]\(\//g, `](${nextConfig.basePath}/`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user