Add TOC to the post layout

main
drebs 2023-12-30 13:27:13 -03:00
parent 1225e3ad28
commit 215855b4e3
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
{{ define "main" }}
<main>
<article>
<h1>{{ .Title }}</h1>
<b><time>{{ .Date.Format (default "2006-01-02 15:04:05" .Site.Params.dateFmt) }}</time></b>
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
<div>
<p>Conteúdo:</p>
{{ .TableOfContents }}
</div>
<div>
{{ .Content }}
</div>
</article>
</main>
{{ partial "sidebar.html" . }}
{{ end }}