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

View File

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

View File

@@ -11,7 +11,7 @@
{% block introduction %}{% endblock introduction %}
<div class="posts neutral">
{% for page in section.pages|reverse %}
{% for page in section.pages %}
<article>
<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">

View File

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

View File

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