mirror of
https://github.com/docker/docs.git
synced 2026-03-27 06:18:55 +07:00
hugo: use partialCached for static templates
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="flex items-start justify-between">
|
||||
<h1 data-pagefind-weight="10">{{ .Title | safeHTML }}</h1>
|
||||
<div class="md-dropdown ml-auto hidden lg:block">
|
||||
{{ partial "md-dropdown.html" . }}
|
||||
{{ partialCached "md-dropdown.html" "-" "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="block lg:hidden">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" />
|
||||
{{ end -}}
|
||||
{{ partial "utils/css.html" "-" }}
|
||||
{{ partialCached "utils/css.html" "-" "-" }}
|
||||
<link href="/pagefind/pagefind-component-ui.css" rel="stylesheet">
|
||||
{{- if hugo.IsProduction -}}
|
||||
<script
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
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"
|
||||
>
|
||||
<span class="icon-svg icon-sm">
|
||||
{{ partial "icon" "content_copy" }}
|
||||
{{ partialCached "icon" "content_copy" "content_copy" }}
|
||||
</span>
|
||||
<span class="icon-svg icon-sm hidden">
|
||||
{{ partial "icon" "check_circle" }}
|
||||
{{ partialCached "icon" "check_circle" "check_circle" }}
|
||||
</span>
|
||||
<span>Copy as Markdown</span>
|
||||
</button>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
{{/* Load the YouTube player if the page embeds a YouTube video */}}
|
||||
{{ with .Store.Get "youtube" }}
|
||||
{{ partial "youtube-script.html" . }}
|
||||
{{ partialCached "youtube-script.html" "-" "-" }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="flex items-start justify-between gap-4">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<div class="md-dropdown ml-auto mr-4 hidden lg:block">
|
||||
{{ partial "md-dropdown.html" . }}
|
||||
{{ partialCached "md-dropdown.html" "-" "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-x-auto">
|
||||
|
||||
Reference in New Issue
Block a user