refactor: using full file names for partials

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
This commit is contained in:
Patrick Kollitsch 2025-02-01 06:58:46 +07:00
parent 907f15826d
commit 5ab0adb0e1
No known key found for this signature in database
GPG Key ID: 01A2661D61A772CA
6 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!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> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

View File

@ -17,7 +17,7 @@
{{ $assets_to_concat := slice }} {{ $assets_to_concat := slice }}
{{/* We add locale css files to the slice in the proper order */}} {{/* 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" }} {{ 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 . }} {{ $assets_to_concat = $assets_to_concat | append . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
@ -47,13 +47,13 @@
css asset directory we (unless condition below) add to aforementioned slice */}} css asset directory we (unless condition below) add to aforementioned slice */}}
{{ with site.Params.custom_css }} {{ with site.Params.custom_css }}
{{ range . }} {{ range . }}
{{ with partialCached "func/style/GetResource" . . }} {{ with partialCached "func/style/GetResource.html" . . }}
{{ if eq .MediaType.SubType "x-scss" "x-sass" "scss" "sass" }} {{ if eq .MediaType.SubType "x-scss" "x-sass" "scss" "sass" }}
{{ if hugo.IsExtended }} {{ if hugo.IsExtended }}
{{/* as we cannot concatenate styles of different types, we sass/scss to be transformed to css beforehand */}} {{/* 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) }} {{ $assets_to_concat = $assets_to_concat | append (. | css.Sass) }}
{{ else }} {{ 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 }} {{ end }}
{{ else }} {{ else }}
{{ $assets_to_concat = $assets_to_concat | append . }} {{ $assets_to_concat = $assets_to_concat | append . }}

View File

@ -9,7 +9,7 @@
@access private @access private
@example - Go Template @example - Go Template
{{ partial "func/warn" $message }} {{ partial "func/warn.html" $message }}
*/}} */}}
{{ $header := "Ananke Theme Warning" }} {{ $header := "Ananke Theme Warning" }}
{{ warnf "\n%s:\n%s" $header . }} {{ warnf "\n%s:\n%s" $header . }}

View File

@ -1,9 +1,9 @@
{{ with partialCached "func/style/GetMainCSS" "style/GetMainCSS" }} {{ with partialCached "func/style/GetMainCSS.html" "style/GetMainCSS" }}
<link rel="stylesheet" href="{{ .RelPermalink }}" > <link rel="stylesheet" href="{{ .RelPermalink }}" >
{{ end }} {{ end }}
{{ range site.Params.custom_css }} {{ range site.Params.custom_css }}
{{ with partialCached "func/style/GetResource" . . }}{{ else }} {{ with partialCached "func/style/GetResource.html" . . }}{{ else }}
<link rel="stylesheet" href="{{ relURL (.) }}"> <link rel="stylesheet" href="{{ relURL (.) }}">
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@ -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. 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` }} More info here: https://github.com/theNewDynamic/gohugo-theme-ananke/releases/tag/v2.8.1` }}
{{ $featured_image := partial "func/GetFeaturedImage.html" . }} {{ $featured_image := partial "func/GetFeaturedImage.html" . }}

View File

@ -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. 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` }} 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"> <div class="relative w-100 mb4 bg-white nested-copy-line-height">