From 513f1c47a9bd3d34c89dce201c71fc2bba0f6605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Mon, 4 Jul 2022 22:41:06 +0800 Subject: [PATCH] :bug: Fixed the Hugo syntax for length function, fixes #14 --- layouts/partials/post/header_meta/categories.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/post/header_meta/categories.html b/layouts/partials/post/header_meta/categories.html index 6daa8e2..db09ec4 100644 --- a/layouts/partials/post/header_meta/categories.html +++ b/layouts/partials/post/header_meta/categories.html @@ -1,11 +1,11 @@ {{- if .Site.Params.postMeta.categories }} -{{- if and .Params.categories (gt (len .Params.categories) 0) }} +{{- with .Params.categories }} - {{- range (first 1 .Params.categories) }} + {{- range (first 1 .) }}