Skip to content

Option to add IDs to the TOC entries #195

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

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

Option to add IDs to the TOC entries #195

cirosantilli opened this issue Dec 15, 2014 · 3 comments
Assignees

Comments

@cirosantilli
Copy link

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
Copy link
Owner

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

@gettalong
Copy link
Owner

This is now implemented!

@cirosantilli
Copy link
Author

Yay, thanks!

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

No branches or pull requests

2 participants