not-matthias / apollo

Modern and minimalistic blog theme.
https://not-matthias.github.io/apollo
MIT License
122 stars 70 forks source link

refactor posts to section template, add extra section frontmatter variable to overwrite section path #5

Closed flxzt closed 1 year ago

flxzt commented 2 years ago

I discovered that the posts template is currently hardcoding the section path and can't really be reused for other sections. This is done to display the posts on the root page.

This PR refactors the posts template into a more generic section.html template which gets used for all sections by zola. To fix the issue with displaying posts on the root page, I added a custom section_path frontmatter variable to overwrite the section used in the template.See the root _index.html to how it is used.

not-matthias commented 1 year ago

Thanks!