1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 04:55:30 -04:00

bundle simple analytics script locally & minify everything with terser

This commit is contained in:
2020-04-27 20:49:20 -04:00
parent cb32af40dc
commit b0893ff52f
10 changed files with 497 additions and 27 deletions

View File

@@ -1,11 +1,9 @@
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "sass/main.scss" . | resources.ToCSS (dict "targetPath" "css/main.min.css") | resources.PostCSS (dict "config" "postcss.config.js") | resources.Fingerprint "sha256" }}
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "sass/main.scss" . | resources.ToCSS (dict "targetPath" "css/main.css") | resources.PostCSS (dict "config" "postcss.config.js") }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{/* Page-specific styles set via front matter, scoped via SCSS */}}
{{ with .Params.css }}
{{- $target := path.Join $.File.Dir "css/inline.min.scss" }}
{{- $css := . | resources.FromString $target | resources.ToCSS | resources.PostCSS (dict "config" "postcss.config.js") | resources.Fingerprint "sha256" -}}
{{- $target := path.Join $.File.Dir "css/inline.scss" }}
{{- $css := . | resources.FromString $target | resources.ToCSS | resources.PostCSS (dict "config" "postcss.config.js") -}}
<link rel="stylesheet" href="{{ $css.Permalink }}">
{{ end }}