flake: add treefmt, reorganize flake, format using treefmt
This commit is contained in:
parent
967b613d91
commit
12aa7125b5
17 changed files with 187 additions and 123 deletions
|
|
@ -1,3 +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,9 +1,11 @@
|
|||
{{- 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,12 +1,11 @@
|
|||
{{- 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 }}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,8 @@
|
|||
{{- /*
|
||||
For a given taxonomy, renders a list of terms assigned to the page.
|
||||
|
||||
@context {page} page The current page.
|
||||
@context {string} taxonomy The taxonony.
|
||||
|
||||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
*/}}
|
||||
|
||||
{{- $page := .page }}
|
||||
{{- $taxonomy := .taxonomy }}
|
||||
|
||||
{{- with $page.GetTerms $taxonomy }}
|
||||
{{- $label := (index . 0).Parent.LinkTitle }}
|
||||
{{- /* For a given taxonomy, renders a list of terms assigned to the page.
|
||||
@context {page} page The current page. @context {string} taxonomy The taxonony.
|
||||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} */}} {{-
|
||||
$page := .page }} {{- $taxonomy := .taxonomy }} {{- with $page.GetTerms
|
||||
$taxonomy }} {{- $label := (index . 0).Parent.LinkTitle }}
|
||||
<div class="tags">
|
||||
<ul>
|
||||
{{- range . }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue