mirror of
https://github.com/skoelle/moonweb-site.git
synced 2026-09-17 17:00:25 +00:00
Fix sitemaps: add pathPrefix for subdirectory sites
- Add site.pathPrefix to infra, smarthome, code, retro configs - Update shared sitemap template to use pathPrefix - Hub has no prefix, subdirectories get /infra/, /smarthome/, etc.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addGlobalData("site", { url: "https://www.moonweb.org" });
|
||||
eleventyConfig.addGlobalData("site", { url: "https://www.moonweb.org", pathPrefix: "/code" });
|
||||
eleventyConfig.addFilter("date", (d) => d.toISOString());
|
||||
eleventyConfig.addPassthroughCopy({ "shared/theme-code.css": "theme.css" });
|
||||
eleventyConfig.addPassthroughCopy({ "shared/base.css": "shared-base.css" });
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addGlobalData("site", { url: "https://www.moonweb.org" });
|
||||
eleventyConfig.addGlobalData("site", { url: "https://www.moonweb.org", pathPrefix: "/infra" });
|
||||
eleventyConfig.addFilter("date", (d) => d.toISOString());
|
||||
eleventyConfig.addPassthroughCopy({ "shared/theme-infra.css": "theme.css" });
|
||||
eleventyConfig.addPassthroughCopy({ "shared/base.css": "shared-base.css" });
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addGlobalData("site", { url: "https://www.moonweb.org" });
|
||||
eleventyConfig.addGlobalData("site", { url: "https://www.moonweb.org", pathPrefix: "/retro" });
|
||||
eleventyConfig.addFilter("date", (d) => d.toISOString());
|
||||
eleventyConfig.addPassthroughCopy({ "shared/theme-retro.css": "theme.css" });
|
||||
eleventyConfig.addPassthroughCopy({ "shared/base.css": "shared-base.css" });
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{%- for page in collections.all %}
|
||||
{%- if not page.url.includes("404") %}
|
||||
<url>
|
||||
<loc>{{ site.url }}{{ page.url }}</loc>
|
||||
<loc>{{ site.url }}{{ site.pathPrefix | default("") }}{{ page.url }}</loc>
|
||||
<lastmod>{{ page.date | date }}</lastmod>
|
||||
<changefreq>{% if page.url == "/" %}weekly{% else %}monthly{% endif %}</changefreq>
|
||||
<priority>{% if page.url == "/" %}1.0{% elif parent %}0.8{% else %}0.7{% endif %}</priority>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addGlobalData("site", { url: "https://www.moonweb.org" });
|
||||
eleventyConfig.addGlobalData("site", { url: "https://www.moonweb.org", pathPrefix: "/smarthome" });
|
||||
eleventyConfig.addFilter("date", (d) => d.toISOString());
|
||||
eleventyConfig.addPassthroughCopy({ "shared/theme-smarthome.css": "theme.css" });
|
||||
eleventyConfig.addPassthroughCopy({ "shared/base.css": "shared-base.css" });
|
||||
|
||||
Reference in New Issue
Block a user