diff --git a/content/templates/functions.md b/content/templates/functions.md index c514a4ec8..a1cf9e27b 100644 --- a/content/templates/functions.md +++ b/content/templates/functions.md @@ -373,6 +373,15 @@ e.g. {{ .Content }} {{ end }} + +### uniq + +Takes in a slice or array and returns a slice with subsequent duplicate elements removed. + + {{ uniq (slice 1 2 3 2) }} + {{ slice 1 2 3 2 | uniq }} + + ## Files ### readDir