aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authorpanda-z <panda.hust@gmail.com>2020-04-13 21:18:35 +0800
committerGitHub <noreply@github.com>2020-04-13 21:18:35 +0800
commit5657112dfb0e6eac2faa2ae1dc0978ed29030709 (patch)
treef22279cb587444b0649f95da647b60daf1f370e9 /layouts/partials
parentd39d3e443953caea05510b19fdd7a259c71a0ab3 (diff)
chore(build): drop webpack and use Hugo Pipes (#130)
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/head.html3
-rw-r--r--layouts/partials/scripts.html5
2 files changed, 6 insertions, 2 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index d602390..7a9f3ea 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -61,7 +61,8 @@
{{- end -}}
<!-- Styles -->
-<link href="{{ print "dist/" .Site.Data.even.assets.even.css | relURL }}" rel="stylesheet">
+{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }}
+<link href="{{ $style.Permalink }}" rel="stylesheet">
{{ if .Site.Params.publicCDN.enable -}}
{{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxCSS | safeHTML }}{{ end }}
{{- else -}}
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index de35229..16cec74 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -67,7 +67,10 @@
<link rel="stylesheet" href="{{ "lib/js-sequence-diagrams/sequence-diagram-2.0.1.min.css" | relURL }}" integrity="sha384-6QbLKJMz5dS3adWSeINZe74uSydBGFbnzaAYmp+tKyq60S7H2p6V7g1TysM5lAaF" crossorigin="anonymous">
{{- end -}}
{{- end }}
-<script type="text/javascript" src="{{ print "dist/" .Site.Data.even.assets.even.js | relURL }}"></script>
+{{ $even := resources.Get "js/even.js" }}
+{{ $main := resources.Get "js/main.js" }}
+{{ $js := slice $even $main | resources.Concat "js/main.js" | fingerprint }}
+<script type="text/javascript" src="{{ $js.Permalink }}"></script>
{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}
<script type="text/javascript">