Skip to content

Commit

Permalink
update goatcounter processing
Browse files Browse the repository at this point in the history
  • Loading branch information
HidegonSan committed Nov 25, 2023
1 parent 8d88c04 commit b22dbbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions assets/js/goatcounter_license.js

This file was deleted.

7 changes: 4 additions & 3 deletions layouts/partials/head/goatcounter.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

{{- if (eq hugo.Environment "production") -}}

{{- $goatcounter_license := (resources.Get "js/goatcounter_license.js") -}}
{{- $goatcounter := (resources.Get "js/goatcounter.js") | minify -}}
{{- $goatcounter_bundled := (slice $goatcounter_license $goatcounter) | resources.Concat "js/goatcounter.js" -}}
{{- $goatcounter_license_body := "// GoatCounter: https://www.goatcounter.com\n// This file (and *only* this file) is released under the ISC license:\n// https://opensource.org/licenses/ISC\n" -}}
{{- $goatcounter_license := $goatcounter_license_body | resources.FromString "js/goatcounter_license.js" -}}
{{- $goatcounter := (resources.Get "js/goatcounter.js") | minify -}}
{{- $goatcounter_bundled := (slice $goatcounter_license $goatcounter) | resources.Concat "js/goatcounter.js" -}}

{{- with $goatcounter_bundled | fingerprint -}}
<script
Expand Down

0 comments on commit b22dbbe

Please sign in to comment.