prettier config + format all, closes #175

This commit is contained in:
vcoppe
2025-02-02 11:17:22 +01:00
parent 01cfd448f0
commit 0b457f9a1e
157 changed files with 17194 additions and 29365 deletions

View File

@@ -10,13 +10,19 @@ function generateSitemap() {
const pages = glob.sync('**/*.html', { cwd: 'build' }).map((page) => `/${page}`);
let sitemap = '<?xml version="1.0" encoding="UTF-8"?>\n';
sitemap += '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">\n';
sitemap +=
'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">\n';
pages.forEach((page) => {
const path = page.replace('/index.html', '').replace('.html', '');
const rootDir = path.split('/')[1];
if (path.includes('embed') || path.includes('404') || languages[path] || languages[rootDir]) {
if (
path.includes('embed') ||
path.includes('404') ||
languages[path] ||
languages[rootDir]
) {
// Skip localized pages
return;
}
@@ -40,4 +46,4 @@ function generateSitemap() {
return sitemap;
}
fs.writeFileSync('build/sitemap.xml', generateSitemap());
fs.writeFileSync('build/sitemap.xml', generateSitemap());