I very like the possibility to use Liquid variables in Jekyll frontmatter through the jekyll-liquify plugin:
module LiquidFilter
def liquify(input)
Liquid::Template.parse(input).render(@context)
end
end
Liquid::Template.register_filter(LiquidFilter)
works great, but i want to go one step further and read the image size with the plugin jekyll-image-size from an image that is given as a liquid variable in frontmatter
image: '{{ page.myimage }}'
... so i need to implement the above parser in the jekyll-image-size plugin
...
class ImageSizeTag < Liquid::Tag
def initialize(tagName, content, tokens)
super
@content = content.strip
@tokens = tokens
end
...
I don't know ruby so i have no clue how to do that, but i guess it shouldn't be too complicated. Thanks for your help!