From 34fc0e619fcd4aef0bd5f729dc08a0135ee426e9 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Mon, 15 Dec 2025 04:02:21 +0800 Subject: [PATCH 1/6] chore(head): normalize color scheme name to lowercase Many users configured the scheme with uppercase letters. While uppercase works on macOS, it causes deployment failures on Ubuntu due to case sensitivity. --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 0ddba873..359ea31d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -99,7 +99,7 @@ {{/* CSS */}} {{ $cssResources := slice }} {{ $schemeName := .Site.Params.colorScheme | default "blowfish" }} - {{ $cssScheme := resources.Get (printf "css/schemes/%s.css" $schemeName) | default (resources.Get "css/schemes/blowfish.css") }} + {{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (lower $schemeName)) | default (resources.Get "css/schemes/blowfish.css") }} {{ $cssResources = $cssResources | append $cssScheme }} {{ $cssResources = $cssResources | append (resources.Get "css/compiled/main.css") }} {{ with resources.Get "css/custom.css" }} From afa810841cb9176bad41eb58a3401db0d38d56e4 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 26 Nov 2025 17:46:53 +0800 Subject: [PATCH 2/6] feat(author): support svg image --- layouts/partials/author-extra.html | 2 +- layouts/partials/author.html | 2 +- layouts/partials/home/background.html | 2 +- layouts/partials/home/hero.html | 2 +- layouts/partials/home/profile.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/partials/author-extra.html b/layouts/partials/author-extra.html index 508383a5..2823977d 100644 --- a/layouts/partials/author-extra.html +++ b/layouts/partials/author-extra.html @@ -10,7 +10,7 @@ {{ if $authorImage }} {{ $final := $authorImage }} {{ $squareImage := $authorImage }} - {{ if not $disableImageOptimization }} + {{ if not (or $disableImageOptimization (eq $authorImage.MediaType.SubType "svg")) }} {{ $final = $authorImage.Fill "192x192" }} {{ $shortSide := int (math.Min $authorImage.Width $authorImage.Height) }} {{ $squareImage = $authorImage.Crop (printf "%dx%d" $shortSide $shortSide ) }} diff --git a/layouts/partials/author.html b/layouts/partials/author.html index ab0fe327..995467e7 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -10,7 +10,7 @@ {{ if $authorImage }} {{ $final := $authorImage }} {{ $squareImage := $authorImage }} - {{ if not $disableImageOptimization }} + {{ if not (or $disableImageOptimization (eq $authorImage.MediaType.SubType "svg")) }} {{ $final = $authorImage.Fill "192x192" }} {{ $shortSide := int (math.Min $authorImage.Width $authorImage.Height) }} {{ $squareImage = $authorImage.Crop (printf "%dx%d" $shortSide $shortSide ) }} diff --git a/layouts/partials/home/background.html b/layouts/partials/home/background.html index c928413f..d67eece1 100644 --- a/layouts/partials/home/background.html +++ b/layouts/partials/home/background.html @@ -52,7 +52,7 @@ {{ if $authorImage }} {{ $final := $authorImage }} {{ $squareImage := $authorImage }} - {{ if not $disableImageOptimization }} + {{ if not (or $disableImageOptimization (eq $authorImage.MediaType.SubType "svg")) }} {{ $final = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }} {{ $shortSide := int (math.Min $authorImage.Width $authorImage.Height) }} {{ $squareImage = $authorImage.Crop (printf "%dx%d" $shortSide $shortSide ) }} diff --git a/layouts/partials/home/hero.html b/layouts/partials/home/hero.html index ed6d81ae..ec11ee0c 100644 --- a/layouts/partials/home/hero.html +++ b/layouts/partials/home/hero.html @@ -55,7 +55,7 @@ {{ if $authorImage }} {{ $final := $authorImage }} {{ $squareImage := $authorImage }} - {{ if not $disableImageOptimization }} + {{ if not (or $disableImageOptimization (eq $authorImage.MediaType.SubType "svg")) }} {{ $final = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }} {{ $shortSide := int (math.Min $authorImage.Width $authorImage.Height) }} {{ $squareImage = $authorImage.Crop (printf "%dx%d" $shortSide $shortSide ) }} diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index 2d27bf68..fdc137fe 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -14,7 +14,7 @@ {{ if $authorImage }} {{ $final := $authorImage }} {{ $squareImage := $authorImage }} - {{ if not $disableImageOptimization }} + {{ if not (or $disableImageOptimization (eq $authorImage.MediaType.SubType "svg")) }} {{ $final = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }} {{ $shortSide := int (math.Min $authorImage.Width $authorImage.Height) }} {{ $squareImage = $authorImage.Crop (printf "%dx%d" $shortSide $shortSide ) }} From 8b362f58d30c1c308ab215d5e752e15fbb4736d8 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:15:03 +0800 Subject: [PATCH 3/6] perf(schema): loop fusion --- layouts/partials/schema.html | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/layouts/partials/schema.html b/layouts/partials/schema.html index 2f14cc69..6d278272 100644 --- a/layouts/partials/schema.html +++ b/layouts/partials/schema.html @@ -49,22 +49,25 @@ "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ - {{- $breadcrumbs := slice -}} + {{- $position := 0 -}} {{- range .Ancestors -}} {{- if not .IsHome -}} - {{- $breadcrumbs = $breadcrumbs | append . -}} + {{- $position = add $position 1 -}} + { + "@type": "ListItem", + "position": {{ $position }}, + "name": "{{ .Title }}", + "item": {{ .Permalink }} + }, {{- end -}} {{- end -}} - {{- $breadcrumbs = $breadcrumbs | append . -}} - - {{- range $index, $element := $breadcrumbs -}} - { - "@type": "ListItem", - "position": {{ add $index 1 }}, - "name": "{{ .Title }}", - "item": {{ .Permalink }}, - }{{ if ne (add $index 1) (len $breadcrumbs) }},{{ end }} - {{- end -}} + {{- $position = add $position 1 -}} + { + "@type": "ListItem", + "position": {{ $position }}, + "name": "{{ .Title }}", + "item": {{ .Permalink }} + } ] }{{ end }}] From 327712d2283d8c5e7a5052317796c722d33b65d3 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Mon, 15 Dec 2025 03:51:05 +0800 Subject: [PATCH 4/6] fix(list): content too narrow --- layouts/_default/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1d4723e5..4070343f 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -51,7 +51,7 @@ {{ end }} -