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

Self-links should be displayed next to H1, H2 etc. in articles #52

Open
2 tasks
jakub-g opened this issue Jan 23, 2014 · 4 comments
Open
2 tasks

Self-links should be displayed next to H1, H2 etc. in articles #52

jakub-g opened this issue Jan 23, 2014 · 4 comments

Comments

@jakub-g
Copy link
Collaborator

jakub-g commented Jan 23, 2014

  • clickable links next to each anchor
  • automatic update of hash in the URL as we scroll

This has been long in my mind and long discussed but never got implemented so far...

When you go to some MD file on Github, next to each header (H1, H2) you can see a #-link to this part of the page when you hover over it

[1] https://github.com/ariatemplates/ariatemplates#getting-started

It's an important feature for sharing links, bookmarking etc.

We already have #-id's for each H1, H2 etc and even links to them in the container on the right hand side [2] , but IMO we should also implement inline links in the GH way [1] or the node way [3]

[2] http://ariatemplates.com/usermanual/latest/page_engine#page-providers
[3] http://nodejs.org/api/modules.html#modules_module_exports

@jakub-g
Copy link
Collaborator Author

jakub-g commented Apr 15, 2014

Apart from that, while the user scrolls, the hash in the URL could be updated using pushState to the currently visible part

@flongo
Copy link
Collaborator

flongo commented Apr 15, 2014

I would just set the hash for a better browser compatibility

@jakub-g
Copy link
Collaborator Author

jakub-g commented Apr 15, 2014

Setting the hash has a drawback of navigating to the ID specified by hash, and this can not be prevented (unless doing some hacky things like, obtaining current browser scroll, setting hash, restoring scroll). Who reads usermanual on IE8? :)

@flongo
Copy link
Collaborator

flongo commented Apr 15, 2014

yes, you are right

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