Skip to content

Commit

Permalink
Use the more robust table of contents renderer
Browse files Browse the repository at this point in the history
Now we have a more robust way to render tables of contents, we don't
have to exclude Jekyll-generated headers on the homepage, and don't have
to do our own set of markdown-mangling. Yay!
  • Loading branch information
SteveMarshall committed Aug 30, 2017
1 parent a879118 commit e51091f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 1 addition & 8 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,7 @@
<div class="toc" data-module="table-of-contents">
<a href="#" class="toc__close js-toc-close" aria-controls="toc" aria-label="Hide table of contents"></a>
<nav id="toc" class="js-toc-list toc__list" aria-labelledby="toc-heading">
{% capture toc_markdown %}
{{ page.content }}
<!-- TOC-start-marker -->
* auto-gen TOC:
{:toc}
{% endcapture %}
{% assign rendered_markdown_with_toc = toc_markdown | markdownify | split: '<!-- TOC-start-marker -->' %}
{{ rendered_markdown_with_toc[1] }}
{% include toc.html html=content %}
</nav>
</div>
</div>
Expand Down
2 changes: 0 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ which covers service design more broadly.
{% for standard_group in standards %}
{% if standard_group.name != "" %}
### {{ standard_group.name }}
{:.no_toc}
{% else %}
### General standards
{:.no_toc}
{% endif %}

{% for standard in standard_group.items %}
Expand Down

0 comments on commit e51091f

Please sign in to comment.