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

推荐使用toc函数锚点 更准确 #19

Open
leeningzzu opened this issue Apr 1, 2019 · 4 comments
Open

推荐使用toc函数锚点 更准确 #19

leeningzzu opened this issue Apr 1, 2019 · 4 comments

Comments

@leeningzzu
Copy link

leeningzzu commented Apr 1, 2019

  1. 删除package.json内hexo-toc信息
  2. 在config.yml内如下添加anchors信息启动toc函数
markdown:
  render:
    html: true
    xhtmlOut: false
    breaks: true
    linkify: true
    typographer: true
    quotes: '“”‘’'
  anchors:
    level: 1
    permalinkSymbol: '' 

可解决用hexo-toc插件中文定位出现undefined问题``

@nqmysb
Copy link

nqmysb commented Apr 1, 2019

这个可以,但是定位效果好像比较生硬,没有smooth效果

@leeningzzu
Copy link
Author

@nqmysb 非常感谢 我用的是toc+smooth函数的结合版 可以实现类似于这种滚动监听的效果嘛https://mensu.github.io/2016/08/11/test-long-catalog-dynamo-amazons-ha-kv-store-ZH.html

@hblolj
Copy link

hblolj commented Jul 15, 2019

@nqmysb 非常感谢 我用的是toc+smooth函数的结合版 可以实现类似于这种滚动监听的效果嘛https://mensu.github.io/2016/08/11/test-long-catalog-dynamo-amazons-ha-kv-store-ZH.html

能够说一下 toc + smooth 的实现吗?

@shifpeng
Copy link

@nqmysb 非常感谢 我用的是toc+smooth函数的结合版 可以实现类似于这种滚动监听的效果嘛https://mensu.github.io/2016/08/11/test-long-catalog-dynamo-amazons-ha-kv-store-ZH.html

贴一下实现吧,感谢🙏

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

No branches or pull requests

4 participants