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

python脚本为h标签增加id属性,实现点击跳转 #59

Open
hwc0919 opened this issue Apr 1, 2020 · 5 comments
Open

python脚本为h标签增加id属性,实现点击跳转 #59

hwc0919 opened this issue Apr 1, 2020 · 5 comments

Comments

@hwc0919
Copy link

hwc0919 commented Apr 1, 2020

目前的网页中, 资料的h标签没有id属性, 点击上方的菜单无法跳转到下方资料对应的位置, 还是需要手动滚动到达下方资料的链接。

使用此脚本, 可以自动为资料的h标签添加对应的id属性, 实现点击菜单自动向下跳转到对应处。

注: 此脚本应该用在 index.html文件, 由于那个仓库没有开Issue功能, 所以在此提出。

使用: 放在index.html同文件夹内, 直接运行(需要安装bs4第三方包)

auto_add_id.zip

@hwc0919
Copy link
Author

hwc0919 commented Apr 1, 2020

配合一个 回到顶部 按钮, 效果更佳

@Sife-shuo
Copy link

eeem,我通过添加了一小串js实现了自动添加id
Fix:lib-pku/lib-pku.github.io#1

@jiongstudeng
Copy link

jiongstudeng commented Jul 13, 2023 via email

@huoshuyinhua699
Copy link

huoshuyinhua699 commented Jul 13, 2023 via email

@Sife-shuo
Copy link

不小心把原来的给关了,重新提交了
Fix: lib-pku/lib-pku.github.io#2

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