Passing parameters to inclusion in Liquid templates

前端 未结 4 764
抹茶落季
抹茶落季 2021-01-30 12:49

On my Jekyll-powered website I have an inclusion that does something function-like, but I can\'t figure out how to pass it parameters correctly.

When I use {% incl

4条回答
  •  没有蜡笔的小新
    2021-01-30 13:05

    As September 1rst of 2020, it did worked this way:

    jekyll v4.1.1

    {% assign title = 'this is my tittle' %}
    {% include subscribeBtn.html title = title %}
    

    Then in the Template:

    {{ title }}

提交回复
热议问题