-
Please see sample project
But output is empty
What could be the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
To my knowledge, unless you manually create one, pages in Jekyll do not have a |
Beta Was this translation helpful? Give feedback.
-
@allejo thanks for quick response. |
Beta Was this translation helpful? Give feedback.
-
A few things, see the output of Secondly, this TOC script will only work if your headings have |
Beta Was this translation helpful? Give feedback.
-
I recommend taking a look at how collections in Jekyll works because I think that's what you're trying to achieve? |
Beta Was this translation helpful? Give feedback.
-
I found that it's not obligatory to place ---
---
<!doctype html>
<html>
<head></head>
<body>
{% include toc.html html=page.content %}
<h1 id="hello_world">Hello world</h1>
</body>
</html>
You are right, output of
Yes, formally toc will not work since without heading id there will be no html anchor. As far as I understand main requirement for jekyll-toc is passing into In my case output is totally empty, problem is that I can't make jekyll-toc work at all so I'm trying to understand why and that's why I created this issue (probably result of our discussion should be README.md improvement) I called jekyll-toc same way like docks.docker.com, minimal-mistakes or bitcoin.org but for some reason output is empty.
I understood sense of collections, in my test case I just want try not keep all content in single markdown file but split content in some files, put them into |
Beta Was this translation helpful? Give feedback.
-
Eureka, I found solution using |
Beta Was this translation helpful? Give feedback.
-
Got it! That's what you were trying to do. Ok then yea, your finding of the |
Beta Was this translation helpful? Give feedback.
Eureka, I found solution using
{% capture %}...{% endcapture %}
tags !pavelsr/jekyll-toc-html-test@bfc1f7b