Fix post ordering

`reverse` is no longer needed with `weight`
This commit is contained in:
Philipp Oppermann
2019-01-22 16:57:22 +01:00
parent ccc36b7d45
commit 53e0749906
5 changed files with 9 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
{% block main %} {% block main %}
{% set posts_section = get_section(path = "first-edition/posts/_index.md") %} {% set posts_section = get_section(path = "first-edition/posts/_index.md") %}
{% set posts = posts_section.pages | reverse %} {% set posts = posts_section.pages %}
<div class="front-page-introduction"> <div class="front-page-introduction">
<p> <p>
This blog series creates a small operating system in the This blog series creates a small operating system in the
@@ -50,11 +50,11 @@
{% set extra = get_section(path = "first-edition/extra/_index.md") %} {% set extra = get_section(path = "first-edition/extra/_index.md") %}
<h1>{{ extra.title }}</h1> <h1>{{ extra.title }}</h1>
<ul> <ul>
{% for subsection_path in extra.subsections|reverse %} {% for subsection_path in extra.subsections %}
{% set subsection = get_section(path=subsection_path) %} {% set subsection = get_section(path=subsection_path) %}
<li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li> <li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li>
{% endfor %} {% endfor %}
{% for page in extra.pages|reverse %} {% for page in extra.pages %}
<li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li> <li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@@ -11,7 +11,7 @@
{% block introduction %}{% endblock introduction %} {% block introduction %}{% endblock introduction %}
<div class="posts neutral"> <div class="posts neutral">
{% for page in section.pages|reverse %} {% for page in section.pages %}
{{ macros::post_link(page=page) }} {{ macros::post_link(page=page) }}
{% endfor %} {% endfor %}
</div> </div>

View File

@@ -11,7 +11,7 @@
{% block introduction %}{% endblock introduction %} {% block introduction %}{% endblock introduction %}
<div class="posts neutral"> <div class="posts neutral">
{% for page in section.pages|reverse %} {% for page in section.pages %}
<article> <article>
<h2 class="post-title"><a href="/{{ page.path | safe }}">{{ page.title }}</a></h2> <h2 class="post-title"><a href="/{{ page.path | safe }}">{{ page.title }}</a></h2>
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date"> <time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">

View File

@@ -6,7 +6,7 @@
{% block main %} {% block main %}
{% set posts_section = get_section(path = "second-edition/posts/_index.md") %} {% set posts_section = get_section(path = "second-edition/posts/_index.md") %}
{% set posts = posts_section.pages | reverse %} {% set posts = posts_section.pages %}
<div class="front-page-introduction"> <div class="front-page-introduction">
<p> <p>
@@ -71,10 +71,10 @@
{% set extra = get_section(path = "second-edition/extra/_index.md") %} {% set extra = get_section(path = "second-edition/extra/_index.md") %}
<h1>{{ extra.title }}</h1> <h1>{{ extra.title }}</h1>
<ul> <ul>
{% for subsection in extra.subsections|reverse %} {% for subsection in extra.subsections %}
<li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li> <li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li>
{% endfor %} {% endfor %}
{% for page in extra.pages|reverse %} {% for page in extra.pages %}
<li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li> <li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@@ -11,7 +11,7 @@
{% block introduction %}{% endblock introduction %} {% block introduction %}{% endblock introduction %}
<div class="posts neutral"> <div class="posts neutral">
{% for page in section.pages|reverse %} {% for page in section.pages %}
{{ macros::post_link(page=page) }} {{ macros::post_link(page=page) }}
{% endfor %} {% endfor %}
</div> </div>