diff options
author | matsuyoshi <sfbgwm30@gmail.com> | 2021-10-21 19:24:53 +0300 |
---|---|---|
committer | matsuyoshi <sfbgwm30@gmail.com> | 2021-10-21 19:40:39 +0300 |
commit | 63827c16f38ce5d590d810c845102dc401aef50b (patch) | |
tree | 1057d7ece653301a498420e064920f912e265cc7 | |
parent | a81a337a2452019ab48a017d9d1827dc9f928230 (diff) |
Use hugo pipeline for CSS
-rw-r--r-- | layouts/partials/head.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a4a13a4..6ccf851 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -21,6 +21,19 @@ {{ end }} <!-- Stylesheets --> <link rel="stylesheet" href="{{ .Site.BaseURL }}fontawesome/css/all.min.css" /> + +{{ $main := resources.Get "css/main.css" }} +{{ $dark := resources.Get "css/dark.css" }} +{{ $syntax := resources.Get "css/syntax.css" }} +{{ $styles := (slice $main $dark $syntax) | resources.Concat "css/styles.css" | minify }} +<link + crossorigin="anonymous" + href="{{ $styles.RelPermalink }}" + integrity="{{ $styles.Data.Integrity }}" + rel="preload stylesheet" + as="style" +/> + {{ range .Site.Params.customCSS }} <link rel="stylesheet" href="{{ . | absURL }}" /> {{ end }} |