Erstes Commit
This commit is contained in:
1
hugo/layouts/partials/category-url.html
Normal file
1
hugo/layouts/partials/category-url.html
Normal file
@@ -0,0 +1 @@
|
||||
{{- $category := .category }}{{ $units := .units }}{{ $available := partial "available-units.html" (dict "category" $category "units" $units) }}{{ $url := "" }}{{ if gt (len $available) 0 }}{{ $firstUnit := "" }}{{ $secondUnit := "" }}{{ range $u, $_ := $available }}{{ if eq $firstUnit "" }}{{ $firstUnit = $u }}{{ else if eq $secondUnit "" }}{{ $secondUnit = $u }}{{ end }}{{ end }}{{ $url = printf "/%s-in-%s/" $firstUnit $secondUnit }}{{ end }}{{- $url -}}
|
||||
Reference in New Issue
Block a user