From fe351c7e38d6ee5366dcda0765f966db6a89593e Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Tue, 5 Aug 2025 12:14:23 +0800 Subject: [PATCH] :sparkles: Feat: add `shortTitle` front matter param for breadcrumb and collection navigation titles to use --- layouts/_partials/breadcrumb.html | 4 ++-- layouts/_partials/init/index.html | 2 +- layouts/_partials/single/collection-list.html | 3 ++- layouts/_partials/single/collection-nav.html | 12 ++++++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/layouts/_partials/breadcrumb.html b/layouts/_partials/breadcrumb.html index eab78a39..67cfda95 100644 --- a/layouts/_partials/breadcrumb.html +++ b/layouts/_partials/breadcrumb.html @@ -22,14 +22,14 @@ {{- if .IsHome -}} {{- $innerText = T "single.home" -}} {{- else -}} - {{- $innerText = (T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle -}} + {{- $innerText = .Page.Params.shortTitle | default (lower .LinkTitle | T) | default .LinkTitle -}} {{- $innerText = cond ((.Param "breadcrumb.capitalize") | and $capitalizeTitles) (title $innerText) $innerText -}} {{- end -}}