mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-10 01:42:32 +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"
|
title = "2020"
|
||||||
sort_by = "date"
|
sort_by = "date"
|
||||||
paginate_by = 5
|
paginate_by = 5
|
||||||
|
transparent = true
|
||||||
+++
|
+++
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
title = "2021"
|
title = "2021"
|
||||||
sort_by = "date"
|
sort_by = "date"
|
||||||
paginate_by = 5
|
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"
|
title = "Posts"
|
||||||
sort_by = "date"
|
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/).
|
Check out the [previous version of my website](https://www.wezm.net/articles/).
|
||||||
|
|
|
@ -21,13 +21,11 @@
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{% set section = get_section(path="posts/_index.md") %}
|
{% set section = get_section(path="posts/_index.md") %}
|
||||||
{% set subsections = section.subsections | reverse %}
|
{% for page in section.pages | sort(attribute="date") | reverse | slice(end=10) %}
|
||||||
{% for sub in subsections %}
|
|
||||||
{% set section = get_section(path=sub) %}
|
|
||||||
{% for page in section.pages %}
|
|
||||||
{% include "article.html" %}
|
{% include "article.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
|
||||||
|
<a href="{{ config.base_url }}/posts/">View more posts →</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="projects-section">
|
<section class="projects-section">
|
||||||
|
|
|
@ -22,12 +22,9 @@
|
||||||
|
|
||||||
{{ section.content | safe }}
|
{{ section.content | safe }}
|
||||||
|
|
||||||
{% for sub in section.subsections %}
|
|
||||||
{% set section = get_section(path=sub) %}
|
|
||||||
{% for page in section.pages %}
|
{% for page in section.pages %}
|
||||||
{% include "article.html" %}
|
{% include "article.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% for page in paginator.pages %}
|
{% for page in paginator.pages %}
|
||||||
{% include "article.html" %}
|
{% include "article.html" %}
|
||||||
|
|
Loading…
Reference in a new issue