Jieiku / abridge

Fast & Lightweight Zola Theme
https://abridge.pages.dev/
MIT License
142 stars 41 forks source link

Create a template for a landing page. #129

Closed Jieiku closed 9 months ago

Jieiku commented 11 months ago

Currently both archive.html and index.html support sections.

so its easy to create a directory under content and a _index.md that points to either of those templates, for instance for content/blog or content/posts.

The plan is create an additional template for a landing page, this template could then be referenced in the main content/_index.md

This would make it so that the main site has a landing page and then the posts could be under any section/directory

I will create example content, that makes setting up under either format easy.

welpo commented 9 months ago

I think this is what I do with tabi: serve all posts from /blog, but show them in the main index/section. I explain how to set this up for tabi in the docs.

Instead of using a new template, I check for the existence of a single section_path variable. If that's present, I send that section to the paginate macro.

See the template and the macro.

Hope that helps!

Jieiku commented 9 months ago

I finished this a few days ago, I extended the pages.html template to also work with sections. I just have not commit it yet.