# (c) Copyright 2021 Ribose Inc. # # TODO Extract that to a separate gem. require "jbuilder" module Jekyll module Geolexica class JbuilderTag < Liquid::Block def render(context) source = super wrapper = JbuilderWrapper.new(context) wrapper.eval_source(source) wrapper.target! rescue Jekyll.logger.error $!.detailed_message raise end # Instance of this class becomes +self+ in Jbuilder templates. # It provides access to Jbuilder instance and current Jekyll context # via +json+ and +context+ accessors, respectively. # There are convenient accessors to +site+ and +page+ Jekyll context # variables, too. # # @example # # Should render {"time": "