Skip to content

Commit

Permalink
✨ feat(info-page): enable arbitrary ToC location
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Oct 26, 2023
1 parent ebaf158 commit 05ab241
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/info-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

<div id="page-content">
<main>
{{ page.content | safe }}
{# The replace pattern is used to enable arbitrary locations for the Table of Contents #}
{# This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 #}
{{ page.content | replace(from="<!-- toc -->", to=macros_toc::toc(page=page, header=false, language_strings=language_strings)) | safe }}
</main>
</div>

Expand Down

0 comments on commit 05ab241

Please sign in to comment.