incorprate suggestions of @davidsneighbour

This commit is contained in:
Klaas Demter 2024-12-01 15:55:04 +01:00 committed by GitHub
parent 3c5b4ead0d
commit 879c88f555
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,6 @@
[ananke]
show_recent_posts = true # show recent posts on the homepage
[ananke.social]
icon_path = "ananke/socials/%s.svg"

View File

@ -4,7 +4,7 @@
</article>
{{/* Define a section to pull recent posts from. For Hugo 0.20 this will default to the section with the most number of pages. */}}
{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
{{ $show_recent_posts := .Site.Params.show_recent_posts | default (true) }}
{{ $show_recent_posts := site.Params.ananke.show_recent_posts }}
{{/* Check to see if the section is defined for ranging through it */}}
{{range ($mainSections)}}