シンプルな Jekyll プラグインを試しています。
class MonthlyArchives < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@text = text
end
def render(context)
"#{@text} #{Time.now}"
end
end
Liquid::Template.register_tag('monthly_archives1', Jekyll::MonthlyArchives)
次のようにページで実行しようとすると:
{% monthly_archives1 %}
Liquid エラーが発生します: 引数の数が間違っています (0 に対して 2)。何か案は ?