fix: fix toc id bug

This commit is contained in:
Dillon 2019-08-20 03:08:25 +08:00
parent 3d8efd6319
commit d7d27e0afb

View file

@ -55,7 +55,9 @@
<details>
<summary class="post-toc-title">{{ T "toc" }}<i class="details icon fas fa-angle-down"></i></summary>
<div class="post-toc-content">
{{ .TableOfContents }}
{{ $toc := .TableOfContents }}
{{ $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc }}
{{ $toc | safeHTML }}
</div>
</details>
</div>