mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 18:15:45 +00:00
Update docs for last template function
This commit is contained in:
1 parent
0a2e5424ab
commit
cc9536ec46
1 file changed
+13
@@ -76,11 +76,24 @@ e.g.
|
|||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
### last
|
||||||
|
Slices an array to only the last X elements.
|
||||||
|
|
||||||
|
Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/)
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
|
||||||
|
{{ range last 10 .Data.Pages }}
|
||||||
|
{{ .Render "summary" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
### after
|
### after
|
||||||
Slices an array to only the items after the Xth item. Use this in
|
Slices an array to only the items after the Xth item. Use this in
|
||||||
combination with `first` use both halves of an array split a item
|
combination with `first` use both halves of an array split a item
|
||||||
X.
|
X.
|
||||||
|
|
||||||
|
Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/)
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
{{ range after 10 .Data.Pages }}
|
{{ range after 10 .Data.Pages }}
|
||||||
|
|||||||
Reference in new issue
Block a user