Prepends object to the front of an array, moving other elements upwards.
Input:
{{ "Paul, George, Ringo" | split: ", " | unshift: "John" | join: ", " }} |
Output:
"John, Paul, George, Ringo" |
This filter also works on arrays with objects, generated by Plate:
{{ site.pages | unshift: page }} |