Pass just the toc to _includes/tocItem.html

This commit is contained in:
Daniel Rudolf 2015-11-04 19:53:52 +01:00
parent 7230b64623
commit 177ddc0fb0
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{% for item in page.toc %}
{% for item in toc %}
<li>
{% if item[1]._title %}
<a href="#{{ item[0] }}">{{ item[1]._title }}</a>

View file

@ -30,10 +30,10 @@
<ul>
{% if page.collection %}
{% for item in items %}
{% include tocItem.html page=item %}
{% include tocItem.html toc=item.toc %}
{% endfor %}
{% else %}
{% include tocItem.html %}
{% include tocItem.html toc=page.toc%}
{% endif %}
</ul>