Skip to content

Commit e9f016b

Browse files
committed
cherry pick patch for blowfish issue#2055
1 parent 92c758e commit e9f016b

File tree

1 file changed

+327
-0
lines changed

1 file changed

+327
-0
lines changed

themes/theme.patch

+327
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
From baaf251bde20c4826e3815c9da23002a2466dba9 Mon Sep 17 00:00:00 2001
2+
From: Ryan Gibson <[email protected]>
3+
Date: Fri, 11 Apr 2025 09:32:47 -0400
4+
Subject: [PATCH 1/2] Rewrite templates/partials for Hugo v0.146.0
5+
6+
---
7+
layouts/_default/baseof.html | 6 +++---
8+
layouts/_default/list.html | 6 +++---
9+
layouts/_default/single.html | 8 ++++----
10+
layouts/_default/taxonomy.html | 6 +++---
11+
layouts/_default/term.html | 6 +++---
12+
layouts/index.html | 6 +++---
13+
layouts/partials/article-link/simple.html | 2 +-
14+
layouts/partials/footer.html | 2 +-
15+
layouts/partials/head.html | 4 ++--
16+
layouts/partials/header/fixed-fill-blur.html | 2 +-
17+
layouts/partials/header/fixed-fill.html | 2 +-
18+
layouts/partials/header/fixed-gradient.html | 2 +-
19+
layouts/partials/header/fixed.html | 2 +-
20+
layouts/shortcodes/figure.html | 2 +-
21+
14 files changed, 28 insertions(+), 28 deletions(-)
22+
23+
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
24+
index 7a1ff83ac..5ab7bcc46 100644
25+
--- a/layouts/_default/baseof.html
26+
+++ b/layouts/_default/baseof.html
27+
@@ -15,11 +15,11 @@
28+
class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">&darr;</span>{{ i18n
29+
"nav.skip_to_main" }}</a>
30+
</div>
31+
- {{ $header := print "partials/header/" .Site.Params.header.layout ".html" }}
32+
- {{ if templates.Exists $header }}
33+
+ {{ $header := print "header/" .Site.Params.header.layout ".html" }}
34+
+ {{ if templates.Exists ( printf "partials/%s" $header ) }}
35+
{{ partial $header . }}
36+
{{ else }}
37+
- {{ partial "partials/header/basic.html" . }}
38+
+ {{ partial "header/basic.html" . }}
39+
{{ end }}
40+
<div class="relative flex flex-col grow">
41+
<main id="main-content" class="grow">
42+
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
43+
index 7cc923889..0b7d90984 100644
44+
--- a/layouts/_default/list.html
45+
+++ b/layouts/_default/list.html
46+
@@ -2,11 +2,11 @@
47+
48+
{{ .Scratch.Set "scope" "list" }}
49+
{{ if .Site.Params.list.showHero | default false }}
50+
-{{ $heroStyle := print "partials/hero/" .Site.Params.list.heroStyle ".html" }}
51+
-{{ if templates.Exists $heroStyle }}
52+
+{{ $heroStyle := print "hero/" .Site.Params.list.heroStyle ".html" }}
53+
+{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
54+
{{ partial $heroStyle . }}
55+
{{ else }}
56+
-{{ partial "partials/hero/basic.html" . }}
57+
+{{ partial "hero/basic.html" . }}
58+
{{ end }}
59+
{{- end -}}
60+
61+
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
62+
index 5defb34c8..a1f2e8186 100644
63+
--- a/layouts/_default/single.html
64+
+++ b/layouts/_default/single.html
65+
@@ -5,11 +5,11 @@
66+
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
67+
{{ $heroStyle := .Params.heroStyle }}
68+
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
69+
- {{ $heroStyle := print "partials/hero/" $heroStyle ".html" }}
70+
- {{ if templates.Exists $heroStyle }}
71+
+ {{ $heroStyle := print "hero/" $heroStyle ".html" }}
72+
+ {{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
73+
{{ partial $heroStyle . }}
74+
{{ else }}
75+
- {{ partial "partials/hero/basic.html" . }}
76+
+ {{ partial "hero/basic.html" . }}
77+
{{ end }}
78+
{{ end }}
79+
80+
@@ -154,7 +154,7 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
81+
82+
{{ partial "article-pagination.html" . }}
83+
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
84+
- {{ if templates.Exists "partials/comments.html" }}
85+
+ {{ if templates.Exists "comments.html" }}
86+
<div class="pt-3">
87+
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
88+
<div class="pt-3">
89+
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
90+
index 94859a69c..43a850dca 100644
91+
--- a/layouts/_default/taxonomy.html
92+
+++ b/layouts/_default/taxonomy.html
93+
@@ -2,11 +2,11 @@
94+
95+
{{ .Scratch.Set "scope" "list" }}
96+
{{ if .Site.Params.taxonomy.showHero | default false }}
97+
-{{ $heroStyle := print "partials/hero/" .Site.Params.taxonomy.heroStyle ".html" }}
98+
-{{ if templates.Exists $heroStyle }}
99+
+{{ $heroStyle := print "hero/" .Site.Params.taxonomy.heroStyle ".html" }}
100+
+{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
101+
{{ partial $heroStyle . }}
102+
{{ else }}
103+
-{{ partial "partials/hero/basic.html" . }}
104+
+{{ partial "hero/basic.html" . }}
105+
{{ end }}
106+
{{- end -}}
107+
108+
diff --git a/layouts/_default/term.html b/layouts/_default/term.html
109+
index ae8c702e5..74b9b6460 100644
110+
--- a/layouts/_default/term.html
111+
+++ b/layouts/_default/term.html
112+
@@ -2,11 +2,11 @@
113+
114+
{{ .Scratch.Set "scope" "term" }}
115+
{{ if .Site.Params.term.showHero | default false }}
116+
-{{ $heroStyle := print "partials/hero/" .Site.Params.term.heroStyle ".html" }}
117+
-{{ if templates.Exists $heroStyle }}
118+
+{{ $heroStyle := print "hero/" .Site.Params.term.heroStyle ".html" }}
119+
+{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
120+
{{ partial $heroStyle . }}
121+
{{ else }}
122+
-{{ partial "partials/hero/basic.html" . }}
123+
+{{ partial "hero/basic.html" . }}
124+
{{ end }}
125+
{{- end -}}
126+
127+
diff --git a/layouts/index.html b/layouts/index.html
128+
index ad851f504..3b35e78a1 100644
129+
--- a/layouts/index.html
130+
+++ b/layouts/index.html
131+
@@ -1,8 +1,8 @@
132+
{{ define "main" }}
133+
- {{ $partial := print "partials/home/" .Site.Params.homepage.layout ".html" }}
134+
- {{ if templates.Exists $partial }}
135+
+ {{ $partial := print "home/" .Site.Params.homepage.layout ".html" }}
136+
+ {{ if templates.Exists ( printf "partials/%s" $partial ) }}
137+
{{ partial $partial . }}
138+
{{ else }}
139+
- {{ partial "partials/home/profile.html" . }}
140+
+ {{ partial "home/profile.html" . }}
141+
{{ end }}
142+
{{ end }}
143+
diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html
144+
index 5a3036225..5aaf18779 100644
145+
--- a/layouts/partials/article-link/simple.html
146+
+++ b/layouts/partials/article-link/simple.html
147+
@@ -85,7 +85,7 @@
148+
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
149+
</div>
150+
{{ end }}
151+
- {{ if templates.Exists "partials/extend-article-link.html" }}
152+
+ {{ if templates.Exists "extend-article-link.html" }}
153+
{{ partial "extend-article-link.html" . }}
154+
{{ end }}
155+
</div>
156+
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
157+
index cce8ae9d5..4d7e80c72 100644
158+
--- a/layouts/partials/footer.html
159+
+++ b/layouts/partials/footer.html
160+
@@ -62,7 +62,7 @@
161+
{{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }}
162+
<script type="text/javascript" src="{{ $jsProcess.RelPermalink }}" integrity="{{ $jsProcess.Data.Integrity }}"></script>
163+
{{/* Extend footer - eg. for extra scripts, etc. */}}
164+
- {{ if templates.Exists "partials/extend-footer.html" }}
165+
+ {{ if templates.Exists "extend-footer.html" }}
166+
{{ partialCached "extend-footer.html" . }}
167+
{{ end }}
168+
</footer>
169+
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
170+
index 43635eba8..57ead88de 100644
171+
--- a/layouts/partials/head.html
172+
+++ b/layouts/partials/head.html
173+
@@ -80,7 +80,7 @@
174+
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
175+
{{ end }}
176+
{{/* Icons */}}
177+
- {{ if templates.Exists "partials/favicons.html" }}
178+
+ {{ if templates.Exists "favicons.html" }}
179+
{{ partialCached "favicons.html" .Site }}
180+
{{ else }}
181+
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" />
182+
@@ -123,7 +123,7 @@
183+
{{/* Analytics */}}
184+
{{ partial "analytics/main.html" .Site }}
185+
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
186+
- {{ if templates.Exists "partials/extend-head.html" }}
187+
+ {{ if templates.Exists "extend-head.html" }}
188+
{{ partialCached "extend-head.html" .Site }}
189+
{{ end }}
190+
<meta name="theme-color"/>
191+
diff --git a/layouts/partials/header/fixed-fill-blur.html b/layouts/partials/header/fixed-fill-blur.html
192+
index 534fe9895..02160bfe4 100644
193+
--- a/layouts/partials/header/fixed-fill-blur.html
194+
+++ b/layouts/partials/header/fixed-fill-blur.html
195+
@@ -2,7 +2,7 @@
196+
<div class="fixed inset-x-0 pl-[24px] pr-[24px]" style="z-index:100">
197+
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom bg-neutral dark:bg-neutral-800"></div>
198+
<div class="relative max-w-[64rem] ml-auto mr-auto">
199+
- {{ partial "partials/header/basic.html" . }}
200+
+ {{ partial "header/basic.html" . }}
201+
</div>
202+
</div>
203+
<script>
204+
diff --git a/layouts/partials/header/fixed-fill.html b/layouts/partials/header/fixed-fill.html
205+
index 4d73a1f43..2cad3db5a 100644
206+
--- a/layouts/partials/header/fixed-fill.html
207+
+++ b/layouts/partials/header/fixed-fill.html
208+
@@ -1,6 +1,6 @@
209+
<div class="min-h-[148px]"></div>
210+
<div class="fixed inset-x-0 pl-[24px] pr-[24px] bg-neutral dark:bg-neutral-800" style="z-index:100">
211+
<div class="relative max-w-[64rem] ml-auto mr-auto">
212+
- {{ partial "partials/header/basic.html" . }}
213+
+ {{ partial "header/basic.html" . }}
214+
</div>
215+
</div>
216+
diff --git a/layouts/partials/header/fixed-gradient.html b/layouts/partials/header/fixed-gradient.html
217+
index 7085b8a74..2e1301a42 100644
218+
--- a/layouts/partials/header/fixed-gradient.html
219+
+++ b/layouts/partials/header/fixed-gradient.html
220+
@@ -3,7 +3,7 @@
221+
<div class="fixed inset-x-0 pl-[24px] pr-[24px]" style="z-index:100">
222+
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
223+
<div class="relative max-w-[64rem] ml-auto mr-auto">
224+
- {{ partial "partials/header/basic.html" . }}
225+
+ {{ partial "header/basic.html" . }}
226+
</div>
227+
</div>
228+
<script>
229+
diff --git a/layouts/partials/header/fixed.html b/layouts/partials/header/fixed.html
230+
index 8e3f64d5c..eee26d9d4 100644
231+
--- a/layouts/partials/header/fixed.html
232+
+++ b/layouts/partials/header/fixed.html
233+
@@ -2,7 +2,7 @@
234+
<div class="fixed inset-x-0 pl-[24px] pr-[24px]" style="z-index:100">
235+
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
236+
<div class="relative max-w-[64rem] ml-auto mr-auto">
237+
- {{ partial "partials/header/basic.html" . }}
238+
+ {{ partial "header/basic.html" . }}
239+
</div>
240+
</div>
241+
<script>
242+
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
243+
index fb7293c8f..030cfce91 100644
244+
--- a/layouts/shortcodes/figure.html
245+
+++ b/layouts/shortcodes/figure.html
246+
@@ -1,6 +1,6 @@
247+
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
248+
{{ if .Get "default" }}
249+
- {{ template "_internal/shortcodes/figure.html" . }}
250+
+ {{ partial "shortcodes/figure.html" . }}
251+
{{ else }}
252+
{{- $url := urls.Parse (.Get "src") }}
253+
{{- $altText := .Get "alt" }}
254+
255+
From 6cfea9bfd1f572959875987ac64cd15430d35302 Mon Sep 17 00:00:00 2001
256+
From: Ryan Gibson <[email protected]>
257+
Date: Fri, 11 Apr 2025 16:22:04 -0400
258+
Subject: [PATCH 2/2] Add "partials/" to static templates.Exists
259+
260+
---
261+
layouts/_default/single.html | 2 +-
262+
layouts/partials/article-link/simple.html | 2 +-
263+
layouts/partials/footer.html | 2 +-
264+
layouts/partials/head.html | 4 ++--
265+
4 files changed, 5 insertions(+), 5 deletions(-)
266+
267+
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
268+
index a1f2e8186..c0a66f788 100644
269+
--- a/layouts/_default/single.html
270+
+++ b/layouts/_default/single.html
271+
@@ -154,7 +154,7 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
272+
273+
{{ partial "article-pagination.html" . }}
274+
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
275+
- {{ if templates.Exists "comments.html" }}
276+
+ {{ if templates.Exists "partials/comments.html" }}
277+
<div class="pt-3">
278+
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
279+
<div class="pt-3">
280+
diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html
281+
index 5aaf18779..5a3036225 100644
282+
--- a/layouts/partials/article-link/simple.html
283+
+++ b/layouts/partials/article-link/simple.html
284+
@@ -85,7 +85,7 @@
285+
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
286+
</div>
287+
{{ end }}
288+
- {{ if templates.Exists "extend-article-link.html" }}
289+
+ {{ if templates.Exists "partials/extend-article-link.html" }}
290+
{{ partial "extend-article-link.html" . }}
291+
{{ end }}
292+
</div>
293+
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
294+
index 4d7e80c72..cce8ae9d5 100644
295+
--- a/layouts/partials/footer.html
296+
+++ b/layouts/partials/footer.html
297+
@@ -62,7 +62,7 @@
298+
{{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }}
299+
<script type="text/javascript" src="{{ $jsProcess.RelPermalink }}" integrity="{{ $jsProcess.Data.Integrity }}"></script>
300+
{{/* Extend footer - eg. for extra scripts, etc. */}}
301+
- {{ if templates.Exists "extend-footer.html" }}
302+
+ {{ if templates.Exists "partials/extend-footer.html" }}
303+
{{ partialCached "extend-footer.html" . }}
304+
{{ end }}
305+
</footer>
306+
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
307+
index 57ead88de..43635eba8 100644
308+
--- a/layouts/partials/head.html
309+
+++ b/layouts/partials/head.html
310+
@@ -80,7 +80,7 @@
311+
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
312+
{{ end }}
313+
{{/* Icons */}}
314+
- {{ if templates.Exists "favicons.html" }}
315+
+ {{ if templates.Exists "partials/favicons.html" }}
316+
{{ partialCached "favicons.html" .Site }}
317+
{{ else }}
318+
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" />
319+
@@ -123,7 +123,7 @@
320+
{{/* Analytics */}}
321+
{{ partial "analytics/main.html" .Site }}
322+
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
323+
- {{ if templates.Exists "extend-head.html" }}
324+
+ {{ if templates.Exists "partials/extend-head.html" }}
325+
{{ partialCached "extend-head.html" .Site }}
326+
{{ end }}
327+
<meta name="theme-color"/>

0 commit comments

Comments
 (0)