Skip to content

Commit c3d8148

Browse files
committed
hugo: use partialCached for static templates
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 0eb4762 commit c3d8148

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

layouts/_partials/content-default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="flex items-start justify-between">
33
<h1 data-pagefind-weight="10">{{ .Title | safeHTML }}</h1>
44
<div class="md-dropdown ml-auto hidden lg:block">
5-
{{ partial "md-dropdown.html" . }}
5+
{{ partialCached "md-dropdown.html" "-" "-" }}
66
</div>
77
</div>
88
<div class="block lg:hidden">

layouts/_partials/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{- range .AlternativeOutputFormats -}}
55
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" />
66
{{ end -}}
7-
{{ partial "utils/css.html" "-" }}
7+
{{ partialCached "utils/css.html" "-" "-" }}
88
<link href="/pagefind/pagefind-component-ui.css" rel="stylesheet">
99
{{- if hugo.IsProduction -}}
1010
<script

layouts/_partials/md-dropdown.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
class="bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition-colors whitespace-nowrap text-gray-900 dark:text-white"
88
>
99
<span class="icon-svg icon-sm">
10-
{{ partial "icon" "content_copy" }}
10+
{{ partialCached "icon" "content_copy" "content_copy" }}
1111
</span>
1212
<span class="icon-svg icon-sm hidden">
13-
{{ partial "icon" "check_circle" }}
13+
{{ partialCached "icon" "check_circle" "check_circle" }}
1414
</span>
1515
<span>Copy as Markdown</span>
1616
</button>

layouts/baseof.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
{{/* Load the YouTube player if the page embeds a YouTube video */}}
9595
{{ with .Store.Get "youtube" }}
96-
{{ partial "youtube-script.html" . }}
96+
{{ partialCached "youtube-script.html" "-" "-" }}
9797
{{ end }}
9898
</body>
9999
</html>

layouts/cli.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="flex items-start justify-between gap-4">
99
<h1>{{ .Title }}</h1>
1010
<div class="md-dropdown ml-auto mr-4 hidden lg:block">
11-
{{ partial "md-dropdown.html" . }}
11+
{{ partialCached "md-dropdown.html" "-" "-" }}
1212
</div>
1313
</div>
1414
<div class="overflow-x-auto">

0 commit comments

Comments
 (0)