theme: cache archetype.hugo #380

This commit is contained in:
Sören Weber 2022-11-13 11:31:46 +01:00
parent 1c251f0790
commit 92919ac893
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,5 @@
{{- $page := .page }}
{{- $content := .content }}
{{- $outputFormat := .outputFormat }}
{{- partial "archetype.hugo" (dict "hook" "article" "page" $page "parameter" (dict "page" $page "content" $content) "outputFormat" $outputFormat) }}
{{- $hook := "article" }}
{{- partialCached "archetype.hugo" (dict "hook" $hook "page" $page "parameter" (dict "page" $page "content" $content) "outputFormat" $outputFormat) $page.RelPermalink $outputFormat $hook }}

View file

@ -113,7 +113,8 @@
{{- end }}
</div>
</nav>
<main id="body-inner" class="highlightable {{ partial "archetype.hugo" (dict "hook" "styleclass" "page" . "parameter" .) }}" tabindex="-1">
{{- $hook := "styleclass" }}
<main id="body-inner" class="highlightable {{ partialCached "archetype.hugo" (dict "hook" $hook "page" . "parameter" . "outputFormat" $outputFormat) .RelPermalink $outputFormat $hook }}" tabindex="-1">
<div class="flex-block-wrapper">
<div id="head-tags">
{{- partial "tags.html" . }}