From 4c41e477e13d37e187c8de4225c7e8056bd9ed28 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Mon, 29 Sep 2025 19:17:13 +0200 Subject: Internalise theme --- layouts/partials/head/index.html | 2 ++ layouts/partials/head/meta.html | 42 +++++++++++++++++++++++++++++---------- layouts/partials/head/styles.html | 22 +++++++++++--------- 3 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 layouts/partials/head/index.html (limited to 'layouts/partials/head') diff --git a/layouts/partials/head/index.html b/layouts/partials/head/index.html new file mode 100644 index 0000000..eb096b8 --- /dev/null +++ b/layouts/partials/head/index.html @@ -0,0 +1,2 @@ +{{- partial "head/meta" . -}} +{{- partial "head/styles" . -}} diff --git a/layouts/partials/head/meta.html b/layouts/partials/head/meta.html index 23a770a..329d9bf 100644 --- a/layouts/partials/head/meta.html +++ b/layouts/partials/head/meta.html @@ -1,12 +1,32 @@ - - - +{{ $favicon := resources.GetMatch .Site.Params.favicon }} + + + + {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }} - - - -{{ with .OutputFormats.Get "rss" -}} -{{ printf ` -` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} -{{ end }} \ No newline at end of file + + + + + + +{{ if .Site.Config.Services.GoogleAnalytics.ID }} + + + + +{{ end }} diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html index 68577ce..cfab45a 100644 --- a/layouts/partials/head/styles.html +++ b/layouts/partials/head/styles.html @@ -1,13 +1,17 @@ -{{/* Resources */}} -{{- $tailwind := resources.Get "css/tailwind.css" | postCSS (dict "config" "./config/postcss.config.js") -}} +{{/* Resources */}} +{{- $tailwind := resources.Get "css/tailwind.css" | postCSS (dict "config" "./config/postcss.config.js") -}} -{{/* Processor */}} -{{- $styles := slice $tailwind | resources.Concat "css/app.css" -}} +{{/* MathJax */}} + + -{{/* Output */}} +{{/* Processor */}} +{{- $styles := slice $tailwind | resources.Concat "css/app.css" -}} + +{{/* Output */}} {{- if eq hugo.Environment "development" -}} - -{{- else -}} -{{- $styles := $styles | minify | fingerprint | resources.PostProcess -}} - + +{{- else -}} + {{- $styles := $styles | minify | fingerprint | resources.PostProcess -}} + {{- end -}} -- cgit v1.3