Skip to content

Instantly share code, notes, and snippets.

@mootari
Last active January 14, 2018 18:51
Show Gist options
  • Save mootari/61f939bcd9329232febb372ee82815df to your computer and use it in GitHub Desktop.
Save mootari/61f939bcd9329232febb372ee82815df to your computer and use it in GitHub Desktop.
Handlebars docblock
{{!--
! A single TOC item.
!
! @param {string} this.slug - Anchor ID
! @param {string} this.content - The heading text.
! @param {array} [this.children] - Optional subheadings.
--}}
<li>
<a href="#{{slug}}">{{content}}</a>
{{#if children}}
<ul>
{{#each children}}
{{>content-toc-item}}
{{/each}}
</ul>
{{/if}}
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment