Remove trailing slash from URLs
This commit is contained in:
parent
ef4e52d57d
commit
fb5caf353b
@ -16,10 +16,15 @@ export default async function(eleventyConfig) {
|
||||
});
|
||||
|
||||
eleventyConfig.addUrlTransform((page) => {
|
||||
if (page.url.endsWith(".html")) {
|
||||
return page.url.slice(0, -1 * ".html".length);
|
||||
if (page.url.endsWith("/")) {
|
||||
return page.url.slice(0, -1);
|
||||
}
|
||||
});
|
||||
// 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}`;
|
||||
|
Loading…
Reference in New Issue
Block a user