Skip to content

Archive page not grouping posts by month in thymeleaf template #5

@upkarlidder

Description

@upkarlidder

The archive page is showing the month for each th:each even though the posts belong to the same month. It renders the month header for each post instead of grouping them by month. Seems like the following line does not update the outer (outside the span) last_month variable.

<span th:remove='all' th:with='last_month = ${#dates.format(post.date,"MMMM yyyy")}'/>

https://github.com/jbake-org/jbake-example-project-thymeleaf/blob/master/templates/archive.thyme#L17

I am not sure how to fix this using thymeleaf only. If you can provide some hints, I will be happy to take a look and contribute back. Thank you !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions