mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 00:33:39 +00:00
19 lines
608 B
HTML
19 lines
608 B
HTML
{{- $defaultConfig := .Site.Data.config.default.widgets.recent_posts -}}
|
|
{{- $configData := ( or .Site.Data.config.widgets.recent_posts $defaultConfig ) -}}
|
|
{{- $lang := .Site.Language.Lang -}}
|
|
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
|
|
|
|
<section class='widget widget-recent_posts sep-after'>
|
|
<header>
|
|
<h4 class='title widget-title'>
|
|
{{- $config.title | default ( i18n "recentPosts" ) -}}
|
|
</h4>
|
|
</header>
|
|
|
|
<ul class='list'>
|
|
{{ range ( where .Site.RegularPages "Type" "not in" $config.excludeTypes ) }}
|
|
{{ .Render "li" }}
|
|
{{ end }}
|
|
</ul>
|
|
</section>
|