Try out no trailing slash urls

This commit is contained in:
Zach Leatherman 2024-09-27 16:16:59 -05:00
parent 31235827fc
commit 18b3f4927b

View File

@ -15,6 +15,16 @@ export default async function(eleventyConfig) {
}
});
eleventyConfig.addUrlTransform((page) => {
if (page.url.endsWith(".html")) {
return page.url.slice(0, -1 * ".html".length);
}
});
eleventyConfig.addGlobalData("permalink", () => {
return (data) =>
`${data.page.filePathStem}.${data.page.outputFileExtension}`;
});
// Copy the contents of the `public` folder to the output folder
// For example, `./public/css/` ends up in `_site/css/`
eleventyConfig