From 7f84716ce8277d6644a958de6be321d0e3377b4e Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sat, 14 May 2022 23:11:39 +0200 Subject: [PATCH] Fix content template --- layouts/partials/content.html | 37 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/layouts/partials/content.html b/layouts/partials/content.html index 6982f05..b9e5f21 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -20,26 +20,27 @@
{{ if .TableOfContents }} - {{ $headers := findRE "(.|\n])+?" .Content }} - - {{ if ge (len $headers) 4 }} -
- {{ .TableOfContents }} -
- {{ end }} - {{ end }} - {{ .Content }} + {{ $headers := findRE "(.|\n)*?" .Content }} + + {{ if ge (len $headers) 4 }} +
+ {{ .TableOfContents }} +
+ {{ end }} + {{ end }} + + {{ .Content }} -
- {{ if .Params.Sources }} -

Sources

-
    - {{ range $i, $e := .Params.Sources }} -
  • {{ markdownify $e }}
  • - {{ end }} -
+
+ {{ if .Params.Sources }} +

Sources

+
    + {{ range $i, $e := .Params.Sources }} +
  • {{ markdownify $e }}
  • {{ end }} -
+ + {{ end }} +
{{ end }}