fix: serve canonical, hreflang and sitemap URLs and restore Export in the PDF editor

This commit is contained in:
alam00000 committed 2026-10-23 15:01:31 +05:30
1 parent 7eec9a0d64
commit 6e8e012d3d
20 files changed
+209 -53

No files matched your search

+2 -2
View File
@@ -111,7 +111,7 @@ function listDocsHtml(dir, prefix) {
);
} else if (entry.name.endsWith('.html') && entry.name !== '404.html') {
const slug = entry.name.replace(/\.html$/, '');
urls.push(slug === 'index' ? `${prefix}/` : `${prefix}/${slug}`);
urls.push(slug === 'index' ? prefix : `${prefix}/${slug}`);
}
}
return urls;
@@ -130,7 +130,7 @@ function addDocsToSitemap() {
return;
}
let xml = fs.readFileSync(sitemapPath, 'utf-8');
if (xml.includes(`<loc>${siteUrl}/docs/</loc>`)) return;
if (xml.includes(`<loc>${siteUrl}/docs</loc>`)) return;
const urls = listDocsHtml(targetDocsPath, '/docs');
const entries = urls