Skip to content

Commit

Permalink
Merge pull request #47 from dasvh/1-adding-a-table-of-contents
Browse files Browse the repository at this point in the history
1 adding a table of contents
  • Loading branch information
joeroe committed May 3, 2023
2 parents 5232e9f + 185724d commit 77a22a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<header class="content__header">
<h1>{{ .Title | markdownify }}</h1>
</header>
{{ if .Params.toc }}
<aside>
{{ .TableOfContents }}
</aside>
{{ end }}
<div class="content__body">
{{ .Content }}
</div>
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/toc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .Page.TableOfContents }}

0 comments on commit 77a22a3

Please sign in to comment.