Feat: add hiddenAdapters param and front matter for recently updated list

This commit is contained in:
Cell
2025-04-07 14:34:40 +08:00
parent 2b936cb6ad
commit 22c3353dde
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "v0.3.17-e2afa113" -}}
{{- .Scratch.Set "version" "v0.3.17-2b936cb6" -}}
{{- .Scratch.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
+4 -1
View File
@@ -18,7 +18,10 @@
{{- $scopePages = .Scratch.Get "mainSectionPages" -}}
{{- end -}}
{{- $scopePages = where $scopePages.ByLastmod.Reverse "Section" "!=" "" -}}
{{- /* {{- $scopePages = where $scopePages "File.IsContentAdapter" "ne" true -}} */ -}}
{{- $hiddenAdapters := .Param "hiddenAdapters" | default false -}}
{{- if $hiddenAdapters -}}
{{- $scopePages = where $scopePages "File.IsContentAdapter" "ne" true -}}
{{- end -}}
{{- range first $maxPostCount $scopePages -}}
{{- if gt (add .Lastmod.Unix (mul 86900 $days)) now.Unix -}}
{{- if ne .Lastmod.Unix .Date.Unix }}