Replies: 3 comments 4 replies
-
As far as I can see, distill.pub does not allow to auto-generate TOC, it must be written up manually. |
Beta Was this translation helpful? Give feedback.
-
@alshedivat Thank you for your response. It seems that the function |
Beta Was this translation helpful? Give feedback.
-
I was able to generate an automatic TOC by following the official jekyll-toc guide as mentioned in the default distill post in al-folio. Steps
<d-byline></d-byline>
<!-- change starts from here -->
<d-article>
<d-contents>
<nav class="l-text figcaption">
<h3>Contents</h3>
{% toc %}
</nav>
</d-contents>
{{ content }}
</d-article>
<!-- change ends here -->
<d-appendix>
PreviewMaybe?I just wish that the TOC would stay on the side even if I scroll through the post. That would make a lot more sense. Can this be done? |
Beta Was this translation helpful? Give feedback.
-
Thank you for such a great theme!
I would like to enable the table of contents in a distill-style blog post (similar to the TOC in posts on distill.pub, see picture below)
It seems that the functionality to do this is present in the code (
al-folio/assets/js/distillpub/template.v2.js
) but, unfortunately, I wasn't able to figure out how to enable it. I tried addingd-toc: true
andtoc: true
to the front matter of the post, but that didn't have any effect. I will appreciate any pointers.EDIT: A solution is provided in the comment below.
Beta Was this translation helpful? Give feedback.
All reactions