Open guoyunhe opened 4 years ago
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.
{% if page.locale.id == post.locale.id %}
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?
In the website I am working on, it list all posts in the home page with pagination:
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:
Is here any better solution?