Jekyll doesn't support includes with parameters
Even this is stated both in the Jekyll docs and Liquid docs... http://jekyllrb.com/docs/templates/#includes gives `{% include footer.html param=value variable-param=page.variable %}` as example - doesn't work. https://docs.shopify.com/themes/liquid-documentation/tags/theme-tags#multi-variable-snippet gives `{% include 'snippet', snippet_variable: 'this is it', snippet_variable_two: 'this is also it' %}` as example - doesn't work either. What kind of shitty software is this? What a unbelievable waste of time...
This commit is contained in:
parent
fd898c1f74
commit
da7ab2ecad
3 changed files with 8 additions and 4 deletions
|
@ -3,7 +3,8 @@
|
|||
{% if item[1]._title %}
|
||||
<a href="#{{ item[0] }}">{{ item[1]._title }}</a>
|
||||
<ul>
|
||||
{% include tocSubItems.html subItems=item[1] %}
|
||||
{% assign subItems = item[1] %}
|
||||
{% include tocSubItems.html %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a href="#{{ item[0] }}">{{ item[1] }}</a>
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
{% if subItem[1]._title %}
|
||||
<a href="#{{ subItem[0] }}">{{ subItem[1]._title }}</a>
|
||||
<ul>
|
||||
{% include tocSubItems.html subItems=subItem[1] %}
|
||||
{% assign subItems = subItem[1] %}
|
||||
{% include tocSubItems.html %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a href="#{{ subItem[0] }}">{{ subItem[1] }}</a>
|
||||
|
|
|
@ -31,11 +31,13 @@
|
|||
{% if page.collection %}
|
||||
{% for item in items %}
|
||||
{% if item.toc and item.nav > 0 %}
|
||||
{% include tocItem.html toc=item.toc %}
|
||||
{% assign toc = item.toc %}
|
||||
{% include tocItem.html %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% include tocItem.html toc=page.toc %}
|
||||
{% assign toc = page.toc %}
|
||||
{% include tocItem.html %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue