jekyll-locale
jekyll-locale copied to clipboard
Archive mix posts of different languages
In the website I am working on, it list all posts in the home page with pagination:
<!-- index.html -->
{% for post in paginator.posts %}
{% include single-post.html %}
{% endfor %}
{% include pagination.html %}
However, the result mix posts of different languages.
I can filter the array with {% if page.locale.id == post.locale.id %} but this will break the pagination.
In other locale pages, the archive is always empty:
<!-- _locales/zh-CN/index.html -->
{% for post in paginator.posts %}
{% include single-post.html %}
{% endfor %}
{% include pagination.html %}
Is here any better solution?