From 22c3353dde8b97f7f4a3ca0a445cea56f0e7fb09 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Mon, 7 Apr 2025 14:34:40 +0800 Subject: [PATCH] :sparkles: Feat: add hiddenAdapters param and front matter for recently updated list --- layouts/partials/init/index.html | 2 +- layouts/partials/recently-updated.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index 5bf1c313..9abb3730 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -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" . -}} diff --git a/layouts/partials/recently-updated.html b/layouts/partials/recently-updated.html index 77ec4023..ea2ecfa5 100644 --- a/layouts/partials/recently-updated.html +++ b/layouts/partials/recently-updated.html @@ -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 }}