From f8541ef965ca22e746b523eb418e47cb4f78f2d8 Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Fri, 9 Jan 2026 12:24:05 +0100 Subject: Upgrade to new template system from Hugo v0.146.0 --- layouts/_partials/head/css.html | 21 ++++++++++++++++++ layouts/_partials/head/js.html | 16 ++++++++++++++ layouts/_partials/head/meta.html | 27 +++++++++++++++++++++++ layouts/_partials/head/seo.html | 46 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 layouts/_partials/head/css.html create mode 100644 layouts/_partials/head/js.html create mode 100644 layouts/_partials/head/meta.html create mode 100644 layouts/_partials/head/seo.html (limited to 'layouts/_partials/head') diff --git a/layouts/_partials/head/css.html b/layouts/_partials/head/css.html new file mode 100644 index 0000000..d4e894e --- /dev/null +++ b/layouts/_partials/head/css.html @@ -0,0 +1,21 @@ +{{- with resources.Get "css/main.css" -}} + {{- $allStylesheets := slice + . + (resources.Get "css/header.css") + (resources.Get "css/navmenu.css") + (resources.Get "css/footer.css") + (resources.Get "css/post-card.css") + (resources.Get "css/page.css") + (resources.Get "css/post.css") + (resources.Get "css/list-navigation.css") + (resources.Get "css/search.css") + -}} + {{- $cssBundle := $allStylesheets | resources.Concat "css/bundle.css" -}} + + {{- if hugo.IsDevelopment -}} + + {{- else -}} + {{- $css := $cssBundle | minify | fingerprint -}} + + {{- end -}} +{{- end -}} diff --git a/layouts/_partials/head/js.html b/layouts/_partials/head/js.html new file mode 100644 index 0000000..0baf831 --- /dev/null +++ b/layouts/_partials/head/js.html @@ -0,0 +1,16 @@ +{{- with resources.Get "js/main.js" }} + {{- $opts := dict + "minify" (not hugo.IsDevelopment) + "sourceMap" (cond hugo.IsDevelopment "external" "") + "targetPath" "js/main.js" + }} + {{- with . | js.Build $opts }} + {{- if hugo.IsDevelopment }} + + {{- else }} + {{- with . | fingerprint }} + + {{- end }} + {{- end }} + {{- end }} +{{- end -}} diff --git a/layouts/_partials/head/meta.html b/layouts/_partials/head/meta.html new file mode 100644 index 0000000..f739838 --- /dev/null +++ b/layouts/_partials/head/meta.html @@ -0,0 +1,27 @@ +{{- /* Basic Meta */ -}} + + + +{{- /* Open Graph */ -}} + + + + + +{{- with site.Params.logo }} + +{{- end }} +{{- if .IsPage }} + + {{- with .Lastmod }} + + {{- end }} +{{- end }} + +{{- /* Twitter Card */ -}} + + + +{{- with site.Params.logo }} + +{{- end }} diff --git a/layouts/_partials/head/seo.html b/layouts/_partials/head/seo.html new file mode 100644 index 0000000..628ea2c --- /dev/null +++ b/layouts/_partials/head/seo.html @@ -0,0 +1,46 @@ + -- cgit v1.2.3