Centralize robots.txt and sitemap

- One robots.txt at root referencing two sitemaps
- One central sitemap.xml with all pages (no per-site sitemaps)
- Deleted: 4 per-site sitemap templates, 4 per-site robots.txt files
- Simplified sitemap template (uses collections.all)
This commit is contained in:
2026-09-11 12:36:18 +02:00
parent c77ad91e0e
commit dbb791b1a6
13 changed files with 4 additions and 52 deletions
+2 -4
View File
@@ -27,16 +27,14 @@ module.exports = function (eleventyConfig) {
// Root-level shared assets
eleventyConfig.addPassthroughCopy({ "shared/base.css": "shared-base.css" });
eleventyConfig.addPassthroughCopy({ "shared/favicon/hub.svg": "favicon.svg" });
eleventyConfig.addPassthroughCopy({ "hub/robots.txt": "robots.txt" });
// Per-section assets: favicon, robots.txt
// Per-section assets: favicon
for (const [section, cfg] of Object.entries(SITES)) {
const prefix = cfg.pathPrefix || ".";
eleventyConfig.addPassthroughCopy({
[`shared/favicon/${section}.svg`]: `${prefix}/favicon.svg`,
});
eleventyConfig.addPassthroughCopy({
[`${section}/robots.txt`]: `${prefix}/robots.txt`,
});
}
// Hub: profile photo