treefmt: fix config, add prettier-plugin-go-template
This commit is contained in:
parent
6ccec6f792
commit
9e8f680c52
10 changed files with 137 additions and 85 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{{ if hugo.IsProduction }}
|
||||
<script
|
||||
data-goatcounter="https://jankremer.goatcounter.com/count"
|
||||
async
|
||||
src="//gc.zgo.at/count.js"
|
||||
></script>
|
||||
<script
|
||||
data-goatcounter="https://jankremer.goatcounter.com/count"
|
||||
async
|
||||
src="//gc.zgo.at/count.js"
|
||||
></script>
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
{{- with resources.Get "css/main.css" }} {{- if eq hugo.Environment
|
||||
"development" }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" />
|
||||
{{- else }} {{- with . | minify | fingerprint }}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{ .RelPermalink }}"
|
||||
integrity="{{ .Data.Integrity }}"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
{{- end }} {{- end }} {{- end }}
|
||||
{{- with resources.Get "css/main.css" }}
|
||||
{{- if eq hugo.Environment
|
||||
"development"
|
||||
}}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" />
|
||||
{{- else }}
|
||||
{{- with . | minify | fingerprint }}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{ .RelPermalink }}"
|
||||
integrity="{{ .Data.Integrity }}"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
{{- with resources.Get "js/main.js" }} {{- if eq hugo.Environment "development"
|
||||
}} {{- with . | js.Build }}
|
||||
<script src="{{ .RelPermalink }}"></script>
|
||||
{{- end }} {{- else }} {{- $opts := dict "minify" true }} {{- with . | js.Build
|
||||
$opts | fingerprint }}
|
||||
<script
|
||||
src="{{ .RelPermalink }}"
|
||||
integrity="{{- .Data.Integrity }}"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
{{- end }} {{- end }} {{- end }}
|
||||
{{- with resources.Get "js/main.js" }}
|
||||
{{- if eq hugo.Environment "development" }}
|
||||
{{- with . | js.Build }}
|
||||
<script src="{{ .RelPermalink }}"></script>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $opts := dict "minify" true }}
|
||||
{{- with . | js.Build
|
||||
$opts | fingerprint
|
||||
}}
|
||||
<script
|
||||
src="{{ .RelPermalink }}"
|
||||
integrity="{{- .Data.Integrity }}"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue