carpentries / styles

Styles for The Carpentries lessons. No README to avoid merge conflicts with lessons. Demo 👇
https://carpentries.github.io/lesson-example
Other
84 stars 94 forks source link

Automatically add deep anchor links using AnchorJS #606

Closed maxim-belkin closed 3 years ago

maxim-belkin commented 3 years ago

I propose to use AnchorJS to automatically add (deep) anchor links. Here is a quick demo:

https://user-images.githubusercontent.com/13123663/120898940-d1599a80-c5f2-11eb-9f8b-225a5e9af616.mov

zkamvar commented 3 years ago

I think adding anchors is a great idea. Is there a reason to include the script as opposed to loading it from the CDN?

maxim-belkin commented 3 years ago

Is there a reason to include the script as opposed to loading it from the CDN?

Only to make offline lesson development possible.

maxim-belkin commented 3 years ago

Thanks for the approval, @fmichonneau. I tested this change locally, and it seems to work as intended (it doesn't mess up the links that kramdown creates).