Update params.yaml to include "micro" in mainSections and clear secondarysections; adjust index.html to display last 20 posts in recent sections

This commit is contained in:
Fundor333
2025-08-05 03:10:26 +02:00
parent 6a3817244a
commit 3dadead8d6
3 changed files with 7 additions and 7 deletions

View File

@@ -12,8 +12,8 @@ defaultColor:
# Setting it to 'auto' applies the color scheme based on the visitor's device color preference.If you don't specify anything, ignore this parameter, or leave it blank, # Setting it to 'auto' applies the color scheme based on the visitor's device color preference.If you don't specify anything, ignore this parameter, or leave it blank,
# the default value is set to 'auto'. # the default value is set to 'auto'.
# You can take a look at layouts/index.html for more information. # You can take a look at layouts/index.html for more information.
mainSections: ["post", "photos", "weeknote", "now"] mainSections: ["post", "photos", "weeknote", "now", "micro"]
secondarysections: ["micro"] secondarysections: []
feedSections: ["post", "photos", "micro", "weeknote"] feedSections: ["post", "photos", "micro", "weeknote"]
commentSections: ["post", "photos", "micro", "weeknote", "series"] commentSections: ["post", "photos", "micro", "weeknote", "series"]
suggestionSections: ["post"] suggestionSections: ["post"]

View File

@@ -1,5 +1,5 @@
--- ---
title: "Re " title: "Re: An incomplete list of blogs that use WebMention"
date: 2025-07-27T21:14:04+02:00 date: 2025-07-27T21:14:04+02:00
description: description:
tags: tags:

View File

@@ -19,10 +19,10 @@
{{ partial "bio" . }} {{ partial "bio" . }}
<main aria-label="Content"> <main aria-label="Content">
<h3 class="posts-item-note" aria-label="Recent Posts">{{ T "home.recent_posts" }}</h3> <h3 class="posts-item-note" aria-label="Recent Posts">{{ T "home.recent_posts" }}</h3>
{{/* Show last 10 posts in reverse date order */}} {{/* Show last 20 posts in reverse date order */}}
{{ $pagesToShow := where .Site.RegularPages "Type" "in" site.Params.mainSections }} {{ $pagesToShow := where .Site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $posts := $pagesToShow.ByDate.Reverse }} {{ $posts := $pagesToShow.ByDate.Reverse }}
{{ range first 10 $posts }} {{ range first 20 $posts }}
{{ partial "postCard" . }} {{ partial "postCard" . }}
{{ end }} {{ end }}
{{ if gt (len $posts) 5 }} {{ if gt (len $posts) 5 }}
@@ -33,10 +33,10 @@
</p> </p>
{{ end }} {{ end }}
<h3 class="posts-item-note" aria-label="Recent status/toots/micropost">{{ T "home.recent_posts" }}</h3> <h3 class="posts-item-note" aria-label="Recent status/toots/micropost">{{ T "home.recent_posts" }}</h3>
{{/* Show last 10 posts in reverse date order */}} {{/* Show last 20 posts in reverse date order */}}
{{ $pagesToShow := where .Site.RegularPages "Type" "in" site.Params.secondarysections }} {{ $pagesToShow := where .Site.RegularPages "Type" "in" site.Params.secondarysections }}
{{ $posts := $pagesToShow.ByDate.Reverse }} {{ $posts := $pagesToShow.ByDate.Reverse }}
{{ range first 10 $posts }} {{ range first 20 $posts }}
{{ partial "postCard" . }} {{ partial "postCard" . }}
{{ end }} {{ end }}
{{ if gt (len $posts) 5 }} {{ if gt (len $posts) 5 }}