We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76ddcb5 commit f139f22Copy full SHA for f139f22
docs/_layouts/default.html
@@ -21,10 +21,11 @@ <h2>Quick Navigation</h2>
21
<ul> <!-- Add this UL here -->
22
{% assign headings = site.pages | where: "path", item.url | first %}
23
{% if headings %}
24
- {% for heading in headings.content | split: '## ' %}
25
- {% if heading != '' %}
26
- {% assign parts = heading | split: '\n' %}
27
- <li><a href="#{{ parts[0] | slugify }}">{{ parts[0] }}</a></li>
+ {% assign content = headings.content %}
+ {% assign lines = content | split: '\n' %}
+ {% for line in lines %}
+ {% if line contains '## ' %}
28
+ <li><a href="#{{ line | split: '## ' | last | slugify }}">{{ line | split: '## ' | last }}</a></li>
29
{% endif %}
30
{% endfor %}
31
0 commit comments