Hexo-theme-next: NexT主题文章目录点击章节不能进行跳转, 我的目录锚链接为undefined [solved]

Created on 9 Aug 2018  ·  7Comments  ·  Source: theme-next/hexo-theme-next

I agree and want to create new issue


Expected behavior

Actual behavior

Steps to reproduce the behavior

  1. N/A
  2. N/A
  3. N/A
  • Link to demo site with this issue: N/A
  • Link(s) to source code or any usefull link(s): N/A

Node.js and NPM Information

$ node -v
v8.11.3

$ npm -v
4.6.1

Package dependencies Information

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.7.1"
  },
  "dependencies": {
    "hexo": "^3.2.0",
    "hexo-admin": "^2.3.0",
    "hexo-asset-image": "git+https://github.com/CodeFalling/hexo-asset-image.git",
    "hexo-deployer-git": "^0.3.1",
    "hexo-generator-archive": "^0.1.4",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-index": "^0.2.1",
    "hexo-generator-searchdb": "^1.0.8",
    "hexo-generator-tag": "^0.2.0",
    "hexo-helper-live2d": "^3.1.0",
    "hexo-leancloud-counter-security": "^1.3.2",
    "hexo-renderer-ejs": "^0.3.0",
    "hexo-renderer-marked": "^0.3.0",
    "hexo-renderer-stylus": "^0.3.1",
    "hexo-server": "^0.2.0",
    "hexo-symbols-count-time": "^0.4.4",
    "hexo-toc": "^1.1.0",
    "hexo-wordcount": "^3.0.2"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-preset-es2015": "^6.24.1",
    "gulp-babel": "^7.0.1",
    "gulp-htmlclean": "^2.7.22",
    "gulp-htmlmin": "^4.0.0",
    "gulp-minify-css": "^1.2.4",
    "gulp-uglify": "^3.0.1"
  }
}

Hexo Information

Hexo version

hexo: 3.7.1
hexo-cli: 1.1.0
os: Windows_NT 6.1.7601 win32 x64
http_parser: 2.8.0
node: 8.11.3
v8: 6.2.414.54
uv: 1.19.1
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.32.0
napi: 3
openssl: 1.0.2o
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c

Hexo Configuration


NexT Information

NexT Version:

  • [x] Latest Master branch
  • [ ] Latest Release version
  • [ ] Old version

NexT Scheme:

  • [ ] All schemes
  • [ ] Muse
  • [ ] Mist
  • [x] Pisces
  • [ ] Gemini

NexT Configuration:

# Table Of Contents in the Sidebar
toc:
  enable: true

  # Automatically add list number to toc.
  number: true

  # If true, all words will placed on next lines if header width longer then sidebar width.
  wrap: true

Other Information

""

为什么章节的链接是 undefined ? why the href of chapter is undefined?

Most helpful comment

@BlueMrD 看了下,很简单,hexo-toc 这个插件导致的。

selection_001

selection_002

这应该是其它主题需要的依赖吧,NexT 不需要,所以:

npm remove hexo-toc --save

另外,F12 后 ERROR 有点多啊哈哈

All 7 comments

請用英文寫。

@BlueMrD 贴一下你站点文件夹下的 package.json 文件

@reuixiy 已贴。

@BlueMrD 看了下,很简单,hexo-toc 这个插件导致的。

selection_001

selection_002

这应该是其它主题需要的依赖吧,NexT 不需要,所以:

npm remove hexo-toc --save

另外,F12 后 ERROR 有点多啊哈哈

@reuixiy 的确如你所说,十分感谢。因为是最近才搭建的博客,所以错误比较多,哈哈。

@BlueMrD so…close the issue~

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MakiseVon picture MakiseVon  ·  7Comments

yongjunwen picture yongjunwen  ·  6Comments

kuretru picture kuretru  ·  3Comments

Linters picture Linters  ·  3Comments

cong picture cong  ·  5Comments