Post list as YYY/MM/DD/slug/index.md

Hello guys,

I’m trying migrate from vuepress and my blog has the content folder with some structure like:

content/2023/
         02/
             10/
                  title-of-article/index.md

As yyyy/mm/dd.

I can see it working in Zola, but I dont know yet how can I show it as paginated or listed in one loop, someone can help me?

My blog.html has:

{% extends "base.html" %}

{% import "post-preview.html" as post_macros %}

{% block posthead %} 
  {% for post in section.pages %}
    <link rel="prerender" href="{{ post.permalink }}" />
  {% endfor %}
{% endblock posthead %}

{% block content %}
{{ section.content | safe }}

{% for post in section.pages %}
    {{ post_macros::post_preview(post=post) }}
  {% endfor %}
{% endblock content %}
1 Like

I am not familiar with your particular use-case, but in general when you are setting pagination for a section you will need to access the items by using paginator.pages instead of section.pages. This is the doc page for the pagination, hopefully it will lead to a solution :slight_smile:

Thanks for the answer.

This was useful, I can see the list of items in all directories now, using transparency.

It really solve my life, I can see all working, the secrets was in create the files _index.md with transparency=true and all done.

1 Like