mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: add recently updated section (#50)
This commit is contained in:
@@ -34,6 +34,20 @@
|
||||
</lastBuildDate>
|
||||
{{- end -}}
|
||||
<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
|
||||
{{- if .Site.Params.section.recentlyUpdated.rss -}}
|
||||
{{- $postCount := 0 -}}
|
||||
{{- $maxPostCount := .Site.Params.section.recentlyUpdated.maxCount | default 10 -}}
|
||||
{{- $days := .Site.Params.section.recentlyUpdated.days | default 30 -}}
|
||||
{{- range (where .Data.Pages.ByLastmod.Reverse "Section" "!=" "") -}}
|
||||
{{- if gt (add .Lastmod.Unix (mul 86900 $days)) now.Unix -}}
|
||||
{{- if lt $postCount $maxPostCount -}}
|
||||
{{- if ne .Lastmod.Unix .Date.Unix }}
|
||||
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range .Pages | first (.Site.Params.section.rss | default 10) -}}
|
||||
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
{{- /* Content */ -}}
|
||||
<div class="content" id="content">
|
||||
{{- /* Expiration Reminder */ -}}
|
||||
{{- partial "single/expirationReminder.html" . -}}
|
||||
{{- partial "single/expiration-reminder.html" . -}}
|
||||
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user