Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A jekyll filter to sort out and return only the wp:post_meta keys and values
module Jekyll
module WPmetadata
def wpmeta(input)
standard_post = [
postdata = input.delete_if {|x| standard_post.index(x)}
# use in a template like this {{ post | wpmeta }}
# returns a hash like { "key" => "value" } for any
# keys in the post hash that are not in the array
# of standard post values (lns 4-24).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.