Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

取消显示侧边栏 toc 目录导航的序号 #154

Open
LiuPiPiPi opened this issue Dec 30, 2021 · 0 comments
Open

取消显示侧边栏 toc 目录导航的序号 #154

LiuPiPiPi opened this issue Dec 30, 2021 · 0 comments

Comments

@LiuPiPiPi
Copy link

官方文档:Hexo辅助函数#toc

参考文章:https://www.cnblogs.com/peihao/p/5269131.html

文件位置:{本地路径}\Hexo\themes\pure\layout\_partial\sidebar-toc.ejs

<nav id="toc" class="article-toc">
  <h3 class="toc-title"><%= __('article.catalogue') %></h3>
  <%- toc(post.content) %>
</nav>

将上述代码修改为:

<nav id="toc" class="article-toc">
  <h3 class="toc-title"><%= __('article.catalogue') %></h3>
  <%- toc(post.content, {
    list_number: false
  }) %>
</nav>

即可实现侧边栏 toc 目录导航序号不显示。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant