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

目录出现不正常显示情况 #48

Open
songhn233 opened this issue Aug 16, 2021 · 1 comment
Open

目录出现不正常显示情况 #48

songhn233 opened this issue Aug 16, 2021 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@songhn233
Copy link
Member

请问一下当文章过长时右侧的文章目录显示不正常的问题如何解决啊?

这是有问题的页面http://dicemy.com/58095.html

之前比较长的文章就出现过这种问题,有的时候不止是目录会出现排版错误,正文也会出现

Originally posted by @Dicemy in #39 (comment)

@songhn233
Copy link
Member Author

songhn233 commented Aug 16, 2021

@Dicemy

经过排查发现,该情况是由于不规范的标题使用

## 2
#### 4
## 2

即使用标题过程中级别出现了跳跃,虽然这是一种不规范的写法,但是按理来说也应该正常显示。

不过这是 Hexo 存在很久的一个问题,并且至今没有修复,详见 hexojs/hexo#2137YunYouJun/hexo-theme-yun#86

所以目前的解决方案是按照规范递进使用标题。

后续可能会通过替代 Hexo 默认 toc 函数等方法解决这个问题。

@songhn233 songhn233 added bug Something isn't working enhancement New feature or request labels Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant