From 5ab0adb0e1c5ec37b82419aeac7eecd6c2612a68 Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <patrick@davids-neighbour.com>
Date: Fri, 31 Jan 2025 23:58:46 +0000
Subject: [PATCH] refactor: using full file names for partials
---
layouts/_default/baseof.html | 2 +-
layouts/partials/func/style/GetMainCSS.html | 6 +++---
layouts/partials/summary-with-image.html | 2 +-
layouts/partials/site-style.html | 6 +++---
layouts/partials/func/warn.html | 4 ++--
layouts/partials/summary.html | 2 +-
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index ebc1ccd..3277921 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="{{ site.Language.LanguageCode }}" {{- with partialCached "func/GetLanguageDirection" "GetLanguageDirection" }} dir="{{ . }}" {{- end }}>
+<html lang="{{ site.Language.LanguageCode }}" {{- with partialCached "func/GetLanguageDirection.html" "GetLanguageDirection" }} dir="{{ . }}" {{- end }}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/layouts/partials/func/style/GetMainCSS.html b/layouts/partials/func/style/GetMainCSS.html
index e626789..025f4e1 100644
--- a/layouts/partials/func/style/GetMainCSS.html
+++ b/layouts/partials/func/style/GetMainCSS.html
@@ -17,7 +17,7 @@
{{ $assets_to_concat := slice }}
{{/* We add locale css files to the slice in the proper order */}}
{{ range slice "_tachyons.css" "_code.css" "_hugo-internal-templates.css" "_social-icons.css" "_styles.css" }}
- {{ with partialCached "func/style/GetResource" . . }}
+ {{ with partialCached "func/style/GetResource.html" . . }}
{{ $assets_to_concat = $assets_to_concat | append . }}
{{ end }}
{{ end }}
@@ -47,13 +47,13 @@
css asset directory we (unless condition below) add to aforementioned slice */}}
{{ with site.Params.custom_css }}
{{ range . }}
- {{ with partialCached "func/style/GetResource" . . }}
+ {{ with partialCached "func/style/GetResource.html" . . }}
{{ if eq .MediaType.SubType "x-scss" "x-sass" "scss" "sass" }}
{{ if hugo.IsExtended }}
{{/* as we cannot concatenate styles of different types, we sass/scss to be transformed to css beforehand */}}
{{ $assets_to_concat = $assets_to_concat | append (. | css.Sass) }}
{{ else }}
- {{ partial "func/warn" (printf "Processing of stylesheet %s of type %s has been skipped. You need Hugo Extended to process such files." .Name .MediaType.SubType) }}
+ {{ partial "func/warn.html" (printf "Processing of stylesheet %s of type %s has been skipped. You need Hugo Extended to process such files." .Name .MediaType.SubType) }}
{{ end }}
{{ else }}
{{ $assets_to_concat = $assets_to_concat | append . }}
diff --git a/layouts/partials/func/warn.html b/layouts/partials/func/warn.html
index b269906..8865dd5 100644
--- a/layouts/partials/func/warn.html
+++ b/layouts/partials/func/warn.html
@@ -9,7 +9,7 @@
@access private
@example - Go Template
- {{ partial "func/warn" $message }}
+ {{ partial "func/warn.html" $message }}
*/}}
{{ $header := "Ananke Theme Warning" }}
-{{ warnf "\n%s:\n%s" $header . }}
\ No newline at end of file
+{{ warnf "\n%s:\n%s" $header . }}
diff --git a/layouts/partials/site-style.html b/layouts/partials/site-style.html
index 0da5c4b..dbcd984 100644
--- a/layouts/partials/site-style.html
+++ b/layouts/partials/site-style.html
@@ -1,9 +1,9 @@
-{{ with partialCached "func/style/GetMainCSS" "style/GetMainCSS" }}
+{{ with partialCached "func/style/GetMainCSS.html" "style/GetMainCSS" }}
<link rel="stylesheet" href="{{ .RelPermalink }}" >
{{ end }}
{{ range site.Params.custom_css }}
- {{ with partialCached "func/style/GetResource" . . }}{{ else }}
+ {{ with partialCached "func/style/GetResource.html" . . }}{{ else }}
<link rel="stylesheet" href="{{ relURL (.) }}">
{{ end }}
-{{ end }}
\ No newline at end of file
+{{ end }}
diff --git a/layouts/partials/summary-with-image.html b/layouts/partials/summary-with-image.html
index f16556e..0be1b39 100644
--- a/layouts/partials/summary-with-image.html
+++ b/layouts/partials/summary-with-image.html
@@ -1,4 +1,4 @@
-{{ partial "func/warn" `You are currently using 'partial "summary-with-image"' in your project templates.
+{{ partial "func/warn.html" `You are currently using 'partial "summary-with-image"' in your project templates.
You should replace it with '.Render "summary-with-image"' as the use of this partial will be deprecated in future releases.
More info here: https://github.com/theNewDynamic/gohugo-theme-ananke/releases/tag/v2.8.1` }}
{{ $featured_image := partial "func/GetFeaturedImage.html" . }}
diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html
index 0c1a0d6..0bb4166 100644
--- a/layouts/partials/summary.html
+++ b/layouts/partials/summary.html
@@ -1,4 +1,4 @@
-{{ partial "func/warn" `You are currently using 'partial "summary"' in your project templates.
+{{ partial "func/warn.html" `You are currently using 'partial "summary"' in your project templates.
You should replace it with '.Render "summary"' as the use of this partial will be deprecated in future releases.
More info here: https://github.com/theNewDynamic/gohugo-theme-ananke/releases/tag/v2.8.1` }}
<div class="relative w-100 mb4 bg-white nested-copy-line-height">
--
Gitblit v1.10.0