From 72b8cf0132d57eae87b0dee0167f0a0315bf5b7b Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Sun, 1 Feb 2026 09:46:29 +0100 Subject: [PATCH] fix recent posts --- content/_index.md | 2 +- content/homelab/_index.md | 1 - templates/index.html | 18 +++++------------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/content/_index.md b/content/_index.md index ed1ca67..e8bd221 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,5 +1,5 @@ +++ -title = "Welcome" +title = "Yan Lin's Blog" +++ My name is Yan Lin, and this is my personal blog where I occasionally post my thoughts and findings during research. diff --git a/content/homelab/_index.md b/content/homelab/_index.md index 850c6d8..413ea93 100644 --- a/content/homelab/_index.md +++ b/content/homelab/_index.md @@ -2,7 +2,6 @@ title = "Homelab" sort_by = "date" paginate_by = 10 -weight = 2 +++ My experience and stories tinkering with home servers, personal cloud, etc. diff --git a/templates/index.html b/templates/index.html index 759e16c..27808d7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,19 +8,11 @@

Recent Posts

{% set root = get_section(path="_index.md") %} - {% set all_pages = [] %} - {% if root.subsections[0] is defined %} - {% set s0 = get_section(path=root.subsections[0]) %} - {% set all_pages = all_pages | concat(with=s0.pages) %} - {% endif %} - {% if root.subsections[1] is defined %} - {% set s1 = get_section(path=root.subsections[1]) %} - {% set all_pages = all_pages | concat(with=s1.pages) %} - {% endif %} - {% if root.subsections[2] is defined %} - {% set s2 = get_section(path=root.subsections[2]) %} - {% set all_pages = all_pages | concat(with=s2.pages) %} - {% endif %} + {% set_global all_pages = [] %} + {% for subsection_path in root.subsections %} + {% set subsection = get_section(path=subsection_path) %} + {% set_global all_pages = all_pages | concat(with=subsection.pages) %} + {% endfor %}