Remove trailing slash from URLs
This commit is contained in:
parent
26f58f9269
commit
ef4e52d57d
@ -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
|
// Copy the contents of the `public` folder to the output folder
|
||||||
// For example, `./public/css/` ends up in `_site/css/`
|
// For example, `./public/css/` ends up in `_site/css/`
|
||||||
eleventyConfig
|
eleventyConfig
|
||||||
|
Loading…
Reference in New Issue
Block a user