I'm moving my WP blog over to eleventy.
I have a posts collection in /site/blog/post1/index.md and this is rendered as /dist/blog/post1/index.html.
I would like yo serve it from the root of my site so it should become /dist/post1/index.htm.
So like http://example.com/blog/post1.html should be http://example.com/post1.html actually.
How can I do that?
If you want to have your /site/blog/post1/index.md files served as /post1.html, you should be able to create a directory config file named /site/blog/blog.json and set a permalink property (which should get applied to all the /site/blog/*/ files):
{
"permalink": "/{{ page.fileSlug }}.html"
}
https://github.com/pdehaan/11ty-1444/blob/master/site/blog/blog.json
Thank you. Exactly what I need.
If you feel that your problem has been solved, please close this issue.
Thanks
Most helpful comment
If you want to have your /site/blog/post1/index.md files served as /post1.html, you should be able to create a directory config file named /site/blog/blog.json and set a
permalinkproperty (which should get applied to all the /site/blog/*/ files):https://github.com/pdehaan/11ty-1444/blob/master/site/blog/blog.json