I would like /content/gear/_index.md to render at /gear, and have /content/index.md render at / (the root). I’m unable to do this. It always renders content/gear/_index.md at /
My goal is to have a static index page, content/_index.md rather than a listing of all pages, after a lot of wrangling with templates, I managed to do this by cloning the default index.html into a new template, and then adding a filter to it:
You’re looping over all posts just to show a single one identified as “index”. There is indeed a simpler way.
In your _index.md, place any markdown you’d like to render. The index.html template doesn’t need to loop over the pages anymore. Try replacing that section with:
{{ section.content | safe }}
You might need to tinker with CSS / the templates a bit more, but this should be a good starting point.