diff --git a/code/eleventy.config.js b/code/eleventy.config.js index 8b6d6a1..c64b2dc 100644 --- a/code/eleventy.config.js +++ b/code/eleventy.config.js @@ -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" }); diff --git a/infra/eleventy.config.js b/infra/eleventy.config.js index 56d2baa..c46e7ac 100644 --- a/infra/eleventy.config.js +++ b/infra/eleventy.config.js @@ -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" }); diff --git a/retro/eleventy.config.js b/retro/eleventy.config.js index 0812a61..434386e 100644 --- a/retro/eleventy.config.js +++ b/retro/eleventy.config.js @@ -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" }); diff --git a/shared/_includes/sitemap.njk b/shared/_includes/sitemap.njk index 470507f..1660dae 100644 --- a/shared/_includes/sitemap.njk +++ b/shared/_includes/sitemap.njk @@ -3,7 +3,7 @@ {%- for page in collections.all %} {%- if not page.url.includes("404") %} - {{ site.url }}{{ page.url }} + {{ site.url }}{{ site.pathPrefix | default("") }}{{ page.url }} {{ page.date | date }} {% if page.url == "/" %}weekly{% else %}monthly{% endif %} {% if page.url == "/" %}1.0{% elif parent %}0.8{% else %}0.7{% endif %} diff --git a/smarthome/eleventy.config.js b/smarthome/eleventy.config.js index a08e52c..25c7c58 100644 --- a/smarthome/eleventy.config.js +++ b/smarthome/eleventy.config.js @@ -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" });