Created
June 5, 2016 18:43
-
-
Save IanMitchell/9e4dd77cdb4fdcdca2c55735eab6208b to your computer and use it in GitHub Desktop.
Concat Plugin for Jekyll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
module ConcatFilter | |
# Public: Combines two arrays | |
# | |
# first_array - The initial Array to use | |
# second_array - The Array to add | |
# | |
# Examples | |
# | |
# {{ site.data.disney_movies | concat: site.data.pixar_movies }} | |
# # => ['Frozen', 'Up'] | |
# | |
# Returns a new Array | |
def concat(first_array, second_array) | |
first_array + second_array | |
end | |
end | |
end | |
Liquid::Template.register_filter(Jekyll::ConcatFilter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment