From 1e5f8eb33bc41cb59faf059e83701152785cabea Mon Sep 17 00:00:00 2001 From: yingyu5658 Date: Sat, 13 Dec 2025 08:33:08 +0800 Subject: Initial commit --- layouts/shortcodes/recent-posts.html | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 layouts/shortcodes/recent-posts.html (limited to 'layouts/shortcodes/recent-posts.html') diff --git a/layouts/shortcodes/recent-posts.html b/layouts/shortcodes/recent-posts.html new file mode 100644 index 0000000..c6c1a3e --- /dev/null +++ b/layouts/shortcodes/recent-posts.html @@ -0,0 +1,55 @@ +{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ +$recent := first 5 $pages.ByDate.Reverse }} + +
+ {{ if $recent }} + + {{ else }} +

暂无文章

+ {{ end }} +
-- cgit v1.2.3