diff options
author | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2021-08-07 14:49:57 +0300 |
---|---|---|
committer | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2021-08-11 15:04:00 +0300 |
commit | a98bf8ca122e88fc7d108a2360b02870a124b72c (patch) | |
tree | 4d875fb75f6e62c0dd2c955a904075c595c9cdb6 /layouts | |
parent | 6713b3fb8d6170a342521cd36c2c8d0026b33535 (diff) |
Add new shortcode toc to support new markup
fixes #395
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/toc.html | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 19c55b8..d00724c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -17,7 +17,7 @@ {{ end }} <div class="post-content markdown"> <div class="main-content-wrap"> - {{ (replaceRE "<!--\\s*[t|T][o|O][c|C]\\s*-->" (printf "<h1 id=\"table-of-contents\">%s</h1>%s" (i18n "post.toc") .TableOfContents) .Content) | safeHTML }} + {{ .Content }} {{ partial "post/gallery.html" . }} </div> </div> diff --git a/layouts/shortcodes/toc.html b/layouts/shortcodes/toc.html new file mode 100644 index 0000000..669f274 --- /dev/null +++ b/layouts/shortcodes/toc.html @@ -0,0 +1,2 @@ +<h1 id="table-of-contents">{{ i18n "post.toc" }}</h1> +{{ .Page.TableOfContents }} |