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

中文目录无法跳转,英文可以跳转 #1543

Closed
wtlizzz opened this issue Aug 4, 2020 · 9 comments
Closed

中文目录无法跳转,英文可以跳转 #1543

wtlizzz opened this issue Aug 4, 2020 · 9 comments

Comments

@wtlizzz
Copy link

wtlizzz commented Aug 4, 2020

屏幕快照 2020-08-04 下午5 05 56

屏幕快照 2020-08-04 下午5 07 03

Environment Information

package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "5.0.0"
  },
  "dependencies": {
    "hexo": "^5.0.0",
    "hexo-admin": "^2.3.0",
    "hexo-asset-image": "^1.0.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^1.0.0",
    "hexo-generator-search": "^2.4.0",
    "hexo-generator-searchdb": "^1.3.2",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-markdown-it-plus": "^1.0.4",
    "hexo-renderer-marked": "^3.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0",
    "hexo-symbols-count-time": "^0.7.1",
    "hexo-wordcount": "^2.0.1"
  }
}

Other Information

LINK(https://wtlizzz.com/)

@wtlizzz wtlizzz added the Bug label Aug 4, 2020
@close-issue-app
Copy link

This issue has been closed because it does not meet our Issue template. Please read our guidelines for contributing.

@welcome
Copy link

welcome bot commented Aug 4, 2020

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

@issue-label-bot
Copy link

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

@wtlizzz
Copy link
Author

wtlizzz commented Aug 4, 2020

Plz.I need help.

@wtlizzz
Copy link
Author

wtlizzz commented Aug 4, 2020

屏幕快照 2020-08-04 下午5 15 55
报错显示

@wtlizzz
Copy link
Author

wtlizzz commented Aug 4, 2020

已解决。
屏幕快照 2020-08-04 下午7 50 13

var target = document.getElementById(event.currentTarget.getAttribute('href').replace('#', ''));
改为:
var target = document.getElementById(decodeURI(event.currentTarget.getAttribute('href').replace('#', '')));

@wtlizzz
Copy link
Author

wtlizzz commented Aug 4, 2020

在下面return部分也要加上,不然选中的话,还是不能显示选中的中文目录。。
~~~
你们都没有这个问题 吗,我怀疑我配置有问题了,呜呜呜~

@alvisdeng
Copy link

我刚刚在 butterfly 也遇到了这个问题, 但是我是因为使用了 Aplayer...

@ousugo
Copy link

ousugo commented Aug 5, 2020

我也遇到了这个问题,现象以及报错和你的完全一样。然后我看了下你的博客,发现也是升级到了 Hexo 5.0,我怀疑是不是因为升级到了 5.0 导致的,因为之前都是正常的,而最近没有做其他修改。

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

No branches or pull requests

4 participants