From 04a4ceaedfad5cccd3961e9f71833e1382dcf2fc Mon Sep 17 00:00:00 2001 From: roninro Date: Thu, 28 Jul 2022 20:04:57 +0800 Subject: support custom js css --- layouts/_default/baseof.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'layouts/_default/baseof.html') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 2b315e1..2711fee 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -32,9 +32,27 @@ "sass")) }} {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }} + + {{ range .Site.Params.custom_css -}} + {{ $custom_template := resources.Get . }} + {{ if $custom_template }} + {{ $custom_style := $custom_template | resources.ToCSS | resources.Minify }} + + {{ end }} + {{ end }} + + {{ range .Site.Params.custom_js -}} + {{ $custom_template := resources.Get . }} + {{ if $custom_template }} + {{ $custom_js := $custom_template | resources.Minify | resources.Fingerprint }} + + {{ end }} + {{ end }} + + {{ $header_img := .Param "header_img" }} -- cgit v1.2.3