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

Option to add IDs to the TOC entries #195

Closed
cirosantilli opened this Issue Dec 15, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@cirosantilli

cirosantilli commented Dec 15, 2014

Input:

-a 
{:toc}

# h1
## h2

Desired TOC:

ul
    li
        a href='#h1' id='toc-h1'
        ul
             li
                 a href='#h2' id='toc-h2'

The new feature would be adding the id on the anchors.

Application: I want to add a link next to each header back to it's TOC entry.

Users can of course hit the Home key to go back up. But you often want to go back to the current header to see what is going on around it, and when you have many headers it is difficult to find it.

This would be uber awesome together with: #188 , and maybe a way to automatically generate the links up.

@gettalong gettalong self-assigned this Dec 25, 2014

@gettalong

This comment has been minimized.

Owner

gettalong commented Feb 4, 2015

Adding the ID to the HTML <a> elements should be no problem, will do this.

@gettalong

This comment has been minimized.

Owner

gettalong commented Feb 5, 2015

This is now implemented!

@cirosantilli

This comment has been minimized.

cirosantilli commented Feb 5, 2015

Yay, thanks!

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