Skip to content

Commit

Permalink
add toc when exist
Browse files Browse the repository at this point in the history
  • Loading branch information
niltor committed Mar 31, 2024
1 parent c6b95e9 commit 282026d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions Lib/BuildSite/HtmlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ 全部 [{allBlogs.Count}]
if (matches.Count > 0)
{
var tocBuilder = new StringBuilder();
tocBuilder.AppendLine(" <p class=\"text-lg\">导航</p>");
tocBuilder.AppendLine(@"<ul class=""toc"">");

foreach (Match match in matches)
Expand Down
1 change: 0 additions & 1 deletion Lib/BuildSite/template/blog.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
</div>
<div class="w-1/4 mt-1 hidden sm:flex">
<div class="toc-block sticky top-2">
<p class="text-lg">导航</p>
@{toc}
</div>
</div>
Expand Down

0 comments on commit 282026d

Please sign in to comment.