From 45fc1a2d560369131862ae536a25db629b2c098c Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Thu, 26 Aug 2021 10:56:49 +0800 Subject: [PATCH] Make css and js resources minify --- layouts/partials/head.html | 3 ++- layouts/partials/scripts.html | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index f846a4e..393e19e 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -23,7 +23,8 @@ {{ partial "meta-tags.html" . }} {{ end -}} {{ with resources.Get "css/katex.css" -}} - + {{ $katexcss := resources.Get "css/katex.css" | minify }} + {{ end -}} {{ $normalizeStyle := resources.Get "css/normalize.css" }} {{ $mainStyle := resources.Get "css/style.css" }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index ce14292..fba27f3 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,8 +1,10 @@ {{ with resources.Get "js/katex.js" }} - + {{ $katexjs := resources.Get "js/katex.js" | minify }} + {{ end }} {{ with resources.Get "js/auto-render.js" }} - + {{ $autorenderjs := resources.Get "js/auto-render.js" | minify }} + {{ end }} {{ $corejs := resources.Get "js/core.js" | minify }}