-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from allejo/hotfix/no-toc-first-heading
- Loading branch information
Showing
3 changed files
with
69 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
# See https://github.com/allejo/jekyll-toc/issues/35 | ||
--- | ||
|
||
{% capture markdown %} | ||
## skip me | ||
{: .no_toc} | ||
|
||
## skip me also | ||
{: .no_toc} | ||
|
||
## skip me, too... | ||
{: .no_toc} | ||
|
||
## skip me last | ||
{: .no_toc} | ||
|
||
### also skip me as a subheading! | ||
{: .no_toc} | ||
|
||
### Subheading A | ||
|
||
### Subheading B | ||
|
||
### Subheading C | ||
{% endcapture %} | ||
{% assign text = markdown | markdownify %} | ||
|
||
{% include toc.html html=text %} | ||
|
||
<!-- /// --> | ||
|
||
<ul> | ||
<li><a href="#subheading-a">Subheading A</a></li> | ||
<li><a href="#subheading-b">Subheading B</a></li> | ||
<li><a href="#subheading-c">Subheading C</a></li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
# See https://github.com/allejo/jekyll-toc/issues/35 | ||
--- | ||
|
||
{% capture markdown %} | ||
## some prominent header i want to hide | ||
{: .no_toc} | ||
|
||
### Subheading A | ||
|
||
### Subheading B | ||
|
||
### Subheading C | ||
{% endcapture %} | ||
{% assign text = markdown | markdownify %} | ||
|
||
{% include toc.html html=text %} | ||
|
||
<!-- /// --> | ||
|
||
<ul> | ||
<li><a href="#subheading-a">Subheading A</a></li> | ||
<li><a href="#subheading-b">Subheading B</a></li> | ||
<li><a href="#subheading-c">Subheading C</a></li> | ||
</ul> |