diff --git a/layouts/404.html b/layouts/404.html
index 8377e3d9dd8..ee18026dd79 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,6 +1,5 @@
{{- partialCached "page-meta.hugo" . .RelPermalink }}
-{{- $outputFormat := partial "output-format.hugo" . }}
{{- partial "meta.html" . }}
@@ -8,7 +7,7 @@
{{ $title }}
{{- partialCached "favicon.html" . }}
- {{- partial "stylesheet.html" (dict "page" . "outputFormat" $outputFormat) }}
+ {{- partial "stylesheet.html" . }}
{{- partial "custom-header.html" . }}
diff --git a/layouts/partials/dependencies.html b/layouts/partials/dependencies.html
index f5495dec0e7..6ad4e0cf025 100644
--- a/layouts/partials/dependencies.html
+++ b/layouts/partials/dependencies.html
@@ -1,6 +1,5 @@
{{- $page := .page }}
{{- $location := .location }}
-{{- $outputFormat := .outputFormat | default (partial "output-format.hugo" $page) }}
{{- range $k, $v := $page.Site.Params.relearn.dependencies }}
{{- $has := printf "has%s" $v.name }}
{{- $hasnested := printf "relearnHasNested%s" $v.name }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 6ad8e42d845..8157809b627 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -7,7 +7,7 @@
{{- $assetBusting := partialCached "assetbusting.hugo" . }}
-{{- partial "dependencies.html" (dict "page" . "location" "footer" "outputFormat" $outputFormat) }}
+{{- partial "dependencies.html" (dict "page" . "location" "footer") }}
{{- partial "custom-footer.html" . }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 89a1018f6cf..0102fbabdb1 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -39,8 +39,8 @@
{{- end }}
{{- partialCached "favicon.html" . }}
- {{- partial "stylesheet.html" (dict "page" . "outputFormat" $outputFormat) }}
- {{- partial "dependencies.html" (dict "page" . "location" "header" "outputFormat" $outputFormat) }}
+ {{- partial "stylesheet.html" . }}
+ {{- partial "dependencies.html" (dict "page" . "location" "header") }}
{{- partial "custom-header.html" . }}
diff --git a/layouts/partials/stylesheet.html b/layouts/partials/stylesheet.html
index 225c866bb05..64590bbaded 100644
--- a/layouts/partials/stylesheet.html
+++ b/layouts/partials/stylesheet.html
@@ -1,10 +1,4 @@
- {{- $page := .page }}
- {{- $outputFormat := .outputFormat }}
- {{- if not $page }}
- {{- $page = . }}
- {{- $outputFormat = partial "output-format.hugo" $page }}
- {{- end }}
- {{- with $page }}
+ {{- $outputFormat := partial "output-format.hugo" . }}
{{- $assetBusting := partialCached "assetbusting.hugo" . }}
{{- /* https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use */}}
@@ -27,8 +21,8 @@
- {{- end }}
\ No newline at end of file
+
\ No newline at end of file
diff --git a/layouts/partials/topbar/button/edit.html b/layouts/partials/topbar/button/edit.html
index b5c43ba48e8..e35895e360d 100644
--- a/layouts/partials/topbar/button/edit.html
+++ b/layouts/partials/topbar/button/edit.html
@@ -2,9 +2,7 @@
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }}
- {{- $format := partial "get-format.hugo" . }}
- {{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
- {{- if and (eq $outputFormat "html") .File }}
+ {{- if .File }}
{{- $filePath := printf "%s%s" (strings.TrimLeft "/" (replace .File.Dir "\\" "/")) .File.LogicalName }}
{{- $href := "" }}
{{- if .Site.Params.editURL }}
diff --git a/layouts/partials/topbar/button/print.html b/layouts/partials/topbar/button/print.html
index 2be3b842b64..8d717de26ba 100644
--- a/layouts/partials/topbar/button/print.html
+++ b/layouts/partials/topbar/button/print.html
@@ -2,10 +2,8 @@
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }}
- {{- $format := partial "get-format.hugo" . }}
- {{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
{{- $printFormat := .OutputFormats.Get "print" }}
- {{- if and (eq $outputFormat "html") $printFormat }}
+ {{- if $printFormat }}
{{- partial "topbar/func/button.html" (dict
"page" .
"class" "topbar-button-print"
diff --git a/layouts/partials/topbar/button/toc.html b/layouts/partials/topbar/button/toc.html
index d7d8dcf7080..54b59897148 100644
--- a/layouts/partials/topbar/button/toc.html
+++ b/layouts/partials/topbar/button/toc.html
@@ -3,11 +3,9 @@
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }}
- {{- $format := partial "get-format.hugo" . }}
- {{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }}
- {{- if and (eq $outputFormat "html") (not $currentDisableToc) }}
+ {{- if not $currentDisableToc }}
{{- $content := partial "toc-class.html" . }}
{{- $hascontent := not (eq 0 (int (len (trim ($content | plainify) "\n\r\t ")))) }}
{{- if not $hascontent }}
diff --git a/layouts/partials/topbar/func/area-button.html b/layouts/partials/topbar/func/area-button.html
index 35015e3d3ff..cee88fc047d 100644
--- a/layouts/partials/topbar/func/area-button.html
+++ b/layouts/partials/topbar/func/area-button.html
@@ -7,22 +7,18 @@
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }}
- {{- $format := partial "get-format.hugo" . }}
- {{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
- {{- if and (eq $outputFormat "html") }}
- {{- $content := printf "\n %s\n
" $area $area (partial (printf "topbar/area/%s.html" $area) .) | safeHTML }}
- {{- partial "topbar/func/button.html" (dict
- "page" .
- "class" (printf "topbar-button-%s" $area)
- "href" "javascript:toggleTopbarFlyout(this)"
- "icon" $icon
- "onempty" $onempty
- "onwidths" $onwidths
- "onwidthm" $onwidthm
- "onwidthl" $onwidthl
- "title" $title
- "hint" $hint
- "content" $content
- )}}
- {{- end }}
+ {{- $content := printf "\n %s\n
" $area $area (partial (printf "topbar/area/%s.html" $area) .) | safeHTML }}
+ {{- partial "topbar/func/button.html" (dict
+ "page" .
+ "class" (printf "topbar-button-%s" $area)
+ "href" "javascript:toggleTopbarFlyout(this)"
+ "icon" $icon
+ "onempty" $onempty
+ "onwidths" $onwidths
+ "onwidthm" $onwidthm
+ "onwidthl" $onwidthl
+ "title" $title
+ "hint" $hint
+ "content" $content
+ )}}
{{- end }}
\ No newline at end of file