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

文章中目录无法使用 #286

Closed
caoler opened this issue Nov 8, 2017 · 10 comments

Comments

Projects
None yet
4 participants
@caoler
Copy link

commented Nov 8, 2017

点击目录链接,无法正确定位
xxx.com/blog/title_name#undefined
link-toc 为#undefined
本应该为
xxx.com/blog/title_name#标题

@strongduanmu

This comment has been minimized.

Copy link

commented Nov 10, 2017

我也是同样问题,解决了吗?大兄弟

@caoler

This comment has been minimized.

Copy link
Author

commented Nov 12, 2017

@strongduanmu 没解决,你要是解决了 记得提醒我一下,感谢!

@ppoffice

This comment has been minimized.

Copy link
Owner

commented Nov 12, 2017

@caoler 请提供使用的Hexo版本以及相关文章的markdown文件

@ppoffice ppoffice added the discussion label Nov 12, 2017

@caoler

This comment has been minimized.

Copy link
Author

commented Nov 13, 2017

@ppoffice

$ hexo -version
hexo: 3.4.0
hexo-cli: 1.0.4
os: Windows_NT 10.0.15063 win32 x64
http_parser: 2.7.0
node: 8.9.0
v8: 6.1.534.46
uv: 1.15.0
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.25.0
openssl: 1.0.2l
icu: 59.1
unicode: 9.0
cldr: 31.0.1
tz: 2017b

markdown内容:http://note.youdao.com/noteshare?id=f5c03c79b7eb5d6995399bf69ceff34e&sub=0F7BB6F31DA14D0C83BB9B7B32781577

演示链接

@ppoffice

This comment has been minimized.

Copy link
Owner

commented Nov 13, 2017

@caoler 可以列出您的博客根目录下的package.json文件么?

@caoler

This comment has been minimized.

Copy link
Author

commented Nov 13, 2017

@ppoffice

{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"hexo": {
"version": "3.4.0"
},
"dependencies": {
"hexo": "^3.2.0",
"hexo-deployer-git": "^0.3.1",
"hexo-deployer-heroku": "^0.1.2",
"hexo-deployer-openshift": "^0.1.2",
"hexo-deployer-rsync": "^0.1.3",
"hexo-generator-archive": "^0.1.4",
"hexo-generator-category": "^0.1.3",
"hexo-generator-feed": "^1.2.2",
"hexo-generator-index": "^0.2.1",
"hexo-generator-json-content": "^3.0.1",
"hexo-generator-sitemap": "^1.2.0",
"hexo-generator-tag": "^0.2.0",
"hexo-renderer-ejs": "^0.3.0",
"hexo-renderer-marked": "^0.2.11",
"hexo-renderer-stylus": "^0.2.3",
"hexo-server": "^0.2.2",
"hexo-toc": "^1.1.0"
}
}

@ppoffice

This comment has been minimized.

Copy link
Owner

commented Nov 13, 2017

@caoler 你所使用的hexo-toc插件和Hexo中的toc不能同时使用,你可以在文章的front-matter中删除:

---
title: 目录测试
date: 2017-11-13 8:40:00
- toc: true
---

然后按照hexo-toc插件的官方指南添加toc。或者删除hexo-toc插件。

@caoler

This comment has been minimized.

Copy link
Author

commented Nov 14, 2017

@ppoffice 删除了hexo-toc插件之后,目录正常了!感谢!!

@ppoffice ppoffice closed this Nov 14, 2017

@strongduanmu

This comment has been minimized.

Copy link

commented Nov 14, 2017

感谢啊

@imdreamer2018

This comment has been minimized.

Copy link

commented Mar 22, 2018

感谢感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.