From 1c251f0790ba0a9748f87a01d0b69778835c666e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 13 Nov 2022 10:55:17 +0100 Subject: [PATCH] theme: reduce calls to output-format.hugo III #380 --- layouts/404.html | 5 +++-- layouts/partials/_main.hugo | 9 +++++---- layouts/partials/archetype.hugo | 6 +++++- layouts/partials/article.html | 3 ++- layouts/partials/body.html | 3 ++- layouts/partials/body.print.html | 3 ++- layouts/partials/header.html | 5 +++-- layouts/partials/nested-article.hugo | 25 ++++++++++++++----------- layouts/partials/output-partial.hugo | 5 ++++- layouts/partials/single-article.hugo | 5 +++-- layouts/partials/stylesheet.html | 11 +++++++++-- 11 files changed, 52 insertions(+), 28 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index 050950a38d..f319b3241a 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,5 +1,6 @@ -{{- partialCached "page-meta.hugo" . . }} +{{- partialCached "page-meta.hugo" . . }} +{{- $outputFormat := partial "output-format.hugo" . }} {{- partial "meta.html" . }} @@ -12,7 +13,7 @@ {{ .Scratch.Get "title" }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }} {{- partialCached "favicon.html" . }} - {{- partial "stylesheet.html" . }} + {{- partialCached "stylesheet.html" (dict "page" . "outputFormat" $outputFormat) $outputFormat }}