设置笔记类文章隐藏首页和rss

This commit is contained in:
Vaica committed 2026-06-02 09:45:34 +08:00
1 parent c636c9ec2e
commit bd23826ce6
5 files changed
+10 -3

No files matched your search

+4 -1
View File
@@ -2,7 +2,10 @@
<div id="pjax-container">
<article>
<div class="post-list section" uk-scrollspy="target: > .post; cls: uk-animation-slide-bottom-small; delay: 100">
{{ $paginator := .Paginate (where (where .Site.RegularPages "Type" "post") "Params.status" "ne" "hidden") }}
{{ $posts := where (where .Site.RegularPages "Type" "post") "Params.status" "ne" "hidden" }}
{{ $exclude := where $posts "Params.categories" "intersect" (slice "笔记") }}
{{ $posts = $posts | complement $exclude }}
{{ $paginator := .Paginate $posts }}
{{ range $paginator.Pages }}
<div class="post">
<div class="time">{{ .Date.Format "January 2, 2006" }}</div>
+2
View File
@@ -4,6 +4,8 @@
{{- $pages = where site.RegularPages "Section" "in" site.Params.mainSections -}}
{{- end }}
{{- $pages = where $pages "Params.hidden" "!=" true -}}
{{- $exclude := where $pages "Params.categories" "intersect" (slice "笔记") -}}
{{- $pages = $pages | complement $exclude -}}
{{- $limit := site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}