Pass just the toc to _includes/tocItem.html
This commit is contained in:
parent
7230b64623
commit
177ddc0fb0
2 changed files with 3 additions and 3 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue