mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-18 04:42:47 +00:00
Fix post ordering
This commit is contained in:
parent
3bcc719e6a
commit
1d7d18c0ac
6 changed files with 16 additions and 13 deletions
|
@ -2,4 +2,5 @@
|
|||
title = "2020"
|
||||
sort_by = "date"
|
||||
paginate_by = 5
|
||||
transparent = true
|
||||
+++
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
title = "2021"
|
||||
sort_by = "date"
|
||||
paginate_by = 5
|
||||
transparent = true
|
||||
+++
|
||||
|
|
6
v2/content/posts/2022/_index.md
Normal file
6
v2/content/posts/2022/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
+++
|
||||
title = "2022"
|
||||
sort_by = "date"
|
||||
paginate_by = 5
|
||||
transparent = true
|
||||
+++
|
|
@ -1,8 +1,8 @@
|
|||
+++
|
||||
title = "Posts"
|
||||
sort_by = "date"
|
||||
paginate_by = 5
|
||||
paginate_by = 50 # TODO: add the page links to the section template
|
||||
+++
|
||||
|
||||
Looking for posts made before 2020?
|
||||
**Looking for posts made before 2020?**
|
||||
Check out the [previous version of my website](https://www.wezm.net/articles/).
|
||||
|
|
|
@ -21,13 +21,11 @@
|
|||
</h2>
|
||||
|
||||
{% set section = get_section(path="posts/_index.md") %}
|
||||
{% set subsections = section.subsections | reverse %}
|
||||
{% for sub in subsections %}
|
||||
{% set section = get_section(path=sub) %}
|
||||
{% for page in section.pages %}
|
||||
{% include "article.html" %}
|
||||
{% endfor %}
|
||||
{% for page in section.pages | sort(attribute="date") | reverse | slice(end=10) %}
|
||||
{% include "article.html" %}
|
||||
{% endfor %}
|
||||
|
||||
<a href="{{ config.base_url }}/posts/">View more posts →</a>
|
||||
</section>
|
||||
|
||||
<section class="projects-section">
|
||||
|
|
|
@ -22,11 +22,8 @@
|
|||
|
||||
{{ section.content | safe }}
|
||||
|
||||
{% for sub in section.subsections %}
|
||||
{% set section = get_section(path=sub) %}
|
||||
{% for page in section.pages %}
|
||||
{% include "article.html" %}
|
||||
{% endfor %}
|
||||
{% for page in section.pages %}
|
||||
{% include "article.html" %}
|
||||
{% endfor %}
|
||||
|
||||
{% for page in paginator.pages %}
|
||||
|
|
Loading…
Reference in a new issue