{{/* this is used to list all the posts from a reader */}} {{ if .Params.list_blog_posts }} {{ $reader := .Params.reader }} {{/* reference - https://stackoverflow.com/a/71562439 */}} {{ $allBlogPosts := where .Site.RegularPages "Section" "blog" }} {{ $posts := where $allBlogPosts "Params.reader" "eq" $reader }} {{ if ge (len $posts) 1 }}

博客文章

{{ range $posts }} {{ end }} {{ end }} {{ end }}