From a4b20f0f4d4aaa05154c0dd6b94f0c88238487d8 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 29 May 2022 11:11:26 +0530 Subject: [PATCH] Add license text for PaperMod in resources --- assets/css/core/license.css | 6 ++++++ assets/js/license.js | 6 ++++++ layouts/partials/head.html | 10 ++++++---- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 assets/css/core/license.css create mode 100644 assets/js/license.js diff --git a/assets/css/core/license.css b/assets/css/core/license.css new file mode 100644 index 00000000..8e81d229 --- /dev/null +++ b/assets/css/core/license.css @@ -0,0 +1,6 @@ +/* + PaperMod v6 + License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE + Copyright (c) 2020 nanxiaobei and adityatelange + Copyright (c) 2021-2022 adityatelange +*/ diff --git a/assets/js/license.js b/assets/js/license.js new file mode 100644 index 00000000..8e81d229 --- /dev/null +++ b/assets/js/license.js @@ -0,0 +1,6 @@ +/* + PaperMod v6 + License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE + Copyright (c) 2020 nanxiaobei and adityatelange + Copyright (c) 2021-2022 adityatelange +*/ diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3b566232..04e7b622 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -37,6 +37,7 @@ {{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} {{- $reset := (resources.Get "css/core/reset.css") }} {{- $media := (resources.Get "css/core/zmedia.css") }} +{{- $license_css := (resources.Get "css/core/license.css") }} {{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} {{- /* include `an-old-hope` if hljs is on */}} @@ -44,12 +45,12 @@ {{- $hljs := (cond ($isHLJSdisabled) (" " | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }} {{- /* order is important */}} -{{- $core := (slice $theme_vars $reset $common $hljs $media) | resources.Concat "assets/css/core.css" }} -{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} +{{- $core := (slice $theme_vars $reset $common $hljs $media) | resources.Concat "assets/css/core.css" | resources.Minify }} +{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }} {{- /* bundle all required css */}} {{- /* Add extended css after theme style */ -}} -{{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }} +{{- $stylesheet := (slice $license_css $core $extended) | resources.Concat "assets/css/stylesheet.css" }} {{- if not site.Params.assets.disableFingerprinting }} {{- $stylesheet := $stylesheet | fingerprint }} @@ -63,8 +64,9 @@ {{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }} {{- $fusejs := resources.Get "js/fuse.basic.min.js" }} +{{- $license_js := resources.Get "js/license.js" }} {{- if not site.Params.assets.disableFingerprinting }} -{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }} +{{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }} {{- else }} {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }}