Add ToC at beginning of posts

master
Quentin Duchemin 2021-05-25 01:11:29 +02:00
parent 2a44e3f3c5
commit f7fa67b81e
Signed by: Chosto
GPG Key ID: 0547178FEEDE7D6B
1 changed files with 5 additions and 0 deletions

View File

@ -24,6 +24,11 @@
<section class="column is-7">
<div>
<article>
<div class="message is-info">
<div class="message-header">Sommaire</div>
<!-- Appreciate this horrible trick, even a 2000's HTML generator won't generate such horrible code -->
<div class="message-body pt-1">{{ .TableOfContents | replaceRE "<a" "<a style='text-decoration:none;'" | safeHTML }}</div>
</div>
{{ .Content }}
</article>
</div>