Correctly slugify distill TOC (#519)
* Correctly slugify distill TOC * Add special character to demo distill post's TOC
This commit is contained in:
parent
17329fca3a
commit
b715177d13
@ -73,11 +73,11 @@
|
||||
<nav class="l-text figcaption">
|
||||
<h3>Contents</h3>
|
||||
{% for section in page.toc -%}
|
||||
<div><a href="#{{ section.name | downcase | replace: ' ','-' }}">{{ section.name }}</a></div>
|
||||
<div><a href="#{{ section.name | slugify }}">{{ section.name }}</a></div>
|
||||
{% if section.subsections -%}
|
||||
<ul>
|
||||
{% for subsection in section.subsections -%}
|
||||
<li><a href="#{{ subsection.name | downcase | replace: ' ','-' }}">{{ subsection.name }}</a></li>
|
||||
<li><a href="#{{ subsection.name | slugify }}">{{ subsection.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{%- endif -%}
|
||||
|
@ -36,7 +36,7 @@ toc:
|
||||
- name: Footnotes
|
||||
- name: Code Blocks
|
||||
- name: Layouts
|
||||
- name: Other Typography
|
||||
- name: Other Typography?
|
||||
|
||||
# Below is an example of injecting additional post-specific styles.
|
||||
# If you use this post as a template, delete this _styles block.
|
||||
@ -173,7 +173,7 @@ It does not interrupt the normal flow of `.l-body` sized text except on mobile s
|
||||
|
||||
***
|
||||
|
||||
## Other Typography
|
||||
## Other Typography?
|
||||
|
||||
Emphasis, aka italics, with *asterisks* (`*asterisks*`) or _underscores_ (`_underscores_`).
|
||||
|
||||
@ -279,4 +279,4 @@ Here's a line for us to start with.
|
||||
This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
|
||||
|
||||
This line is also a separate paragraph, but...
|
||||
This line is only separated by a single newline, so it's a separate line in the *same paragraph*.
|
||||
This line is only separated by a single newline, so it's a separate line in the *same paragraph*.
|
||||
|
Loading…
Reference in New Issue
Block a user