Skip to content

content order is inconsistent #32

Open
@amrirasyidi

Description

@amrirasyidi

The ordering part of the index.html seems to be inconsistent in my end.

        <div class="content container">
            {% block content %}
                <div class="posts">
                    {% for page in section.pages %}
                      {% if page.extra.front_page %}
                        <div class="post">
                          <h1 class="post-title">
                            <a href="{{ page.permalink }}">
                              {{ page.title | safe }}
                            </a>
                          </h1>

                          <span class="post-date">
                            {{ page.date | date(format="%Y-%m-%d") }}
                            {% if page.authors %}
                              by {% for author in page.authors %}{{ author }}{% if not loop.last %}, {% endif %}{% endfor %}
                            {% endif %}
                          </span>
                          {{ page.description }}
                        </div>
                      {% endif %}
                    {% endfor %}
                </div>
            {% endblock content %}
        </div>

Sometime when I add | reverse it actually sort the post descendingly by its date (which is I wanted to be), but the other time it is ascending. How to properly sort the posts by its date in descending order?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions