Filters
push
Last updated: · Published:
Removes the last element from an array and returns array with remaining elements. If an integer is passed as argument, this amount of elements will be removed.
Input
{{ "John, Paul, George" | split: ", " | push: "Ringo" | join: ", " }}
Output
"John, Paul, George, Ringo"
This filter also works on arrays with objects, generated by Plate:
Input
{{ site.pages | push: page }}