From 2b2bde7ba846fdbba9feab0671b23765cf977f66 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Thu, 11 Jul 2024 09:45:32 +0800 Subject: [PATCH] :bug: Fix: collection nav and list can not show in posts that have password --- layouts/partials/single/collection-list.html | 4 ++-- layouts/partials/single/collection-nav.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/single/collection-list.html b/layouts/partials/single/collection-list.html index 37490dfb..66defcb8 100644 --- a/layouts/partials/single/collection-list.html +++ b/layouts/partials/single/collection-list.html @@ -1,14 +1,14 @@ {{- /* Collection List */ -}} {{- $params := partial "function/params.html" -}} -{{- if .Params.collections | and $params.collectionList | and (not $params.password) -}} +{{- if .Params.collections | and $params.collectionList -}} {{- $collectionTerms := .GetTerms "collections" -}} {{- range $collectionTerms -}} {{- $pages := (where .Pages "Params.Weight" "!=" nil) | append (where .Pages "Params.Weight" "eq" nil).ByDate -}} {{- $open := eq (index $collectionTerms 0) . -}} {{- $currentKey := 0 -}} -