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

Add back/forward browser feature to TOC links #52

Open
Jos512 opened this issue Jul 19, 2017 · 3 comments
Open

Add back/forward browser feature to TOC links #52

Jos512 opened this issue Jul 19, 2017 · 3 comments
Assignees

Comments

@Jos512
Copy link

Jos512 commented Jul 19, 2017

When I click on the links in the TOC of an article, it doesn't update the browser URL. That means I can't quickly jump back and forth in the document with the browser's previous and next feature.

(Duplicate of: https://discourse.gohugo.io/t/new-docs-site-released/7470/3?u=jura)

@budparr budparr self-assigned this Jul 19, 2017
budparr pushed a commit that referenced this issue Jul 19, 2017
The smooth scroll script breaks the back button and presents accessibility issues with focus and motion.

Fixes #52

Reference: https://css-tricks.com/smooth-scrolling-accessibility/
@budparr
Copy link

budparr commented Jul 20, 2017

@rdwatters Going to take up our previous conversation here. Can you send me, or point me to the script you were using before? Sounds like it might fit our needs, or at least worth considering.

@ghost
Copy link

ghost commented Jul 22, 2017

Here's an example of Hugo with smooth scroll in a TOC:
https://hackcabin.com/post/become-digital-nomad-bali/

Implementation in After Dark theme:
https://github.com/comfusion/after-dark

And if you want to really step it up for docs add AnchorJS like this:
https://habd.as/zero-to-http-2-aws-hugo/

@rdwatters
Copy link
Contributor

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

3 participants