hexo-theme-next icon indicating copy to clipboard operation
hexo-theme-next copied to clipboard

@[toc](文章目录),在文章里不显示目录

Open RiotGamesU opened this issue 5 years ago • 5 comments

Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist

  • [ x ] I am using the latest version of NexT.
  • [ x ] I have read the relevant documents of Hexo and NexT.
  • [ x ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me.

Expected behavior

1.在文章开头显示目录,并且点击目录可以跳转到指定的标题: a1 2.如果第1个问题无法实现,那是否可以调整sidebar的文章目录的位置?默认的sidebar的文章目录的位置: a3

Actual behavior

  • Links to demo site with this issue: N/A
  • Links to repository or source code of the blog: N/A

1.同样的代码复制到next,但是文章开头不显示目录: a2 2.如果第1个问题无法实现,那是否可以调整sidebar的文章目录的位置?目标位置: 文章的开头部分

Steps to reproduce the behavior

  1. N/A
  2. N/A
  3. N/A

Environment Information

Node.js and NPM Information

node -v:
v12.16.3

npm -v:
6.14.4

Package dependencies Information

npm ls --depth 0:
`-- (empty)

Hexo Configuration


NexT Configuration


Other Information

RiotGamesU avatar Jul 16 '20 06:07 RiotGamesU

Thanks for opening this issue, maintainers will get back to you as soon as possible!

welcome[bot] avatar Jul 16 '20 06:07 welcome[bot]

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

issue-label-bot[bot] avatar Jul 16 '20 06:07 issue-label-bot[bot]

@[toc](目录) 不属于markdown的语法

jiangtj avatar Aug 03 '20 03:08 jiangtj

try this https://github.com/bubkoo/hexo-toc

GitHub
📖 Insert a markdown TOC before posts be rendered. Contribute to bubkoo/hexo-toc development by creating an account on GitHub.

sli1989 avatar Aug 27 '20 03:08 sli1989

在需要添加目录的地方使用

<!-- toc -->

ccmajor avatar Dec 23 '20 02:12 ccmajor