From 7b4b78ee8458b16a6167170bf7405d7bf911cfbc Mon Sep 17 00:00:00 2001 From: Francesco Date: Mon, 22 Apr 2024 13:19:56 +0200 Subject: Initial --- layouts/partials/head/css.html | 11 +++++++++++ layouts/partials/head/js.html | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 layouts/partials/head/css.html create mode 100644 layouts/partials/head/js.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..abca3b8 --- /dev/null +++ b/layouts/partials/head/css.html @@ -0,0 +1,11 @@ +{{- $CSS := slice +(resources.Get "css/reset.css") +(resources.Get "css/vars.css") +(resources.Get "css/utils.css") +(resources.Get "css/fonts.css") +(resources.Get "css/main.css") | +resources.Concat "assets/combined.css" | +minify | +fingerprint }} + + \ No newline at end of file diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html new file mode 100644 index 0000000..18fe842 --- /dev/null +++ b/layouts/partials/head/js.html @@ -0,0 +1,12 @@ +{{- with resources.Get "js/main.js" }} + {{- if eq hugo.Environment "development" }} + {{- with . | js.Build }} + + {{- end }} + {{- else }} + {{- $opts := dict "minify" true }} + {{- with . | js.Build $opts | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} -- cgit v1.2.3