mirror of
https://github.com/balkian/balkian.github.com.git
synced 2025-10-22 19:28:30 +00:00
18 lines
672 B
HTML
18 lines
672 B
HTML
{{ if .Site.Params.orderByPublishDate }}
|
|
{{ $.Scratch.Set "recentPosts" .Site.RegularPages.ByPublishDate.Reverse }}
|
|
{{ else }}
|
|
{{ $.Scratch.Set "recentPosts" .Site.RegularPages }}
|
|
{{ end }}
|
|
|
|
{{ with .Site.Params.postAmount.sidebar }}
|
|
{{ $.Scratch.Set "postLimit" . }}
|
|
{{ else }}
|
|
{{ $.Scratch.Set "postLimit" 5 }}
|
|
{{ end }}
|
|
|
|
{{ range first ($.Scratch.Get "postLimit") (where ($.Scratch.Get "recentPosts") "Type" "post") }}
|
|
|
|
<dt><a href="{{ .Permalink }}">{{ .Title }}</a></dt>
|
|
{{ .Render "item-tags" }}
|
|
{{ end }}
|