Initial commit
This commit is contained in:
commit
1f637ed41e
33 changed files with 832 additions and 0 deletions
9
themes/er/layouts/partials/table-of-contents.html
Normal file
9
themes/er/layouts/partials/table-of-contents.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!-- ignore empty links with + -->
|
||||
{{ $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content }}
|
||||
<!-- at least one header to link to -->
|
||||
{{ $has_headers := ge (len $headers) 1 }}
|
||||
<!-- a post can explicitly disable Table of Contents with toc: false -->
|
||||
{{ $show_toc := and (ne .Params.toc false) (ne .Site.Params.showtoc false) }}
|
||||
{{ if and $has_headers $show_toc }}
|
||||
<div class="tl fixed list-pages lh-copy" id="contents-list"></div>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue