jekyll-toc icon indicating copy to clipboard operation
jekyll-toc copied to clipboard

Can't use like this: {{ post.content | toc }}

Open duzyn opened this issue 9 years ago • 2 comments

{% if post.toc %}
  {{ post.content | toc }}
{% else %}
  {{ post.content }}
{% endif %}

duzyn avatar Jul 02 '16 10:07 duzyn

This works for me in the post layout:

    {% if page.toc %}
    {{ content | toc }}
    {% endif %}

marcanuy avatar Jul 03 '16 04:07 marcanuy

Yes, it works in post layout. But if I use in a paginator I have to use like this:

{% for post in paginator.posts %}
{% if post.toc %}
  {{ post.content | toc }}
{% else %}
  {{ post.content }}
{% endif %}
{% endfor %}

It doesn't work.

duzyn avatar Jul 03 '16 04:07 duzyn