Update with custom theme files
This commit is contained in:
parent
3b303aee07
commit
0c277c2458
45 changed files with 4324 additions and 11 deletions
9
layouts/partials/reverse-slice.html
Normal file
9
layouts/partials/reverse-slice.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!-- Source: https://discourse.gohugo.io/t/reverse-array/28753/2 -->
|
||||
|
||||
{{- $sliceOriginal := . -}}
|
||||
{{- $len := len $sliceOriginal -}}
|
||||
{{- $sliceReversed := slice -}}
|
||||
{{- range seq $len -}}
|
||||
{{- $sliceReversed = $sliceReversed | append (index $sliceOriginal (sub $len .)) }}
|
||||
{{- end -}}
|
||||
{{- return $sliceReversed -}}
|
Loading…
Add table
Add a link
Reference in a new issue