Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix: fix toc id bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Aug 19, 2019
1 parent 3d8efd6 commit d7d27e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ <h2 class="post-toc-title">{{ T "toc" }}</h2>
<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>
Expand Down

0 comments on commit d7d27e0

Please sign in to comment.