summaryrefslogtreecommitdiff
path: root/layouts/_default/baseof.html
diff options
context:
space:
mode:
authorroninro <liumy.f@foxmail.com>2022-07-28 20:04:57 +0800
committerroninro <liumy.f@foxmail.com>2022-07-28 20:04:57 +0800
commit04a4ceaedfad5cccd3961e9f71833e1382dcf2fc (patch)
tree31d475b10af3d6d6953b4af7efa24c8f0057581e /layouts/_default/baseof.html
parent25bf7c8342ba8ecb59363bf6043dc62a3585bf87 (diff)
support custom js css
Diffstat (limited to 'layouts/_default/baseof.html')
-rw-r--r--layouts/_default/baseof.html18
1 files changed, 18 insertions, 0 deletions
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 }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
+
+ {{ range .Site.Params.custom_css -}}
+ {{ $custom_template := resources.Get . }}
+ {{ if $custom_template }}
+ {{ $custom_style := $custom_template | resources.ToCSS | resources.Minify }}
+ <link rel="stylesheet" href="{{ $custom_style.RelPermalink }}">
+ {{ end }}
+ {{ end }}
+ <!-- custom js -->
+ {{ range .Site.Params.custom_js -}}
+ {{ $custom_template := resources.Get . }}
+ {{ if $custom_template }}
+ {{ $custom_js := $custom_template | resources.Minify | resources.Fingerprint }}
+ <script defer src="{{ $custom_js.RelPermalink }}"></script>
+ {{ end }}
+ {{ end }}
+
</head>
<!-- hack iOS CSS :active style -->
+
<body ontouchstart="">
{{ $header_img := .Param "header_img" }}