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

Make headings clickable for #anchored URLs #285

Open
Fang- opened this issue Nov 15, 2019 · 8 comments
Open

Make headings clickable for #anchored URLs #285

Fang- opened this issue Nov 15, 2019 · 8 comments

Comments

@Fang-
Copy link
Contributor

Fang- commented Nov 15, 2019

A lot of our docs pages are fairly long and have multiple sections. Often, I want to link someone to a specific part of the page. We support /some/page#anchor behavior for most of our headings, but having to append that manually (and sometimes, figuring out the right anchor text to use) it a bit burdensome. It would be great if we could click headers, or a 🖇 next to them, to navigate to its #anchor on the page. Similar to how Github allows you to do in readme's and other .md files.

@matildepark
Copy link
Collaborator

matildepark commented Nov 15, 2019 via email

@Fang-
Copy link
Contributor Author

Fang- commented Nov 15, 2019

I'd say making them invisibly clickable is fine. Expected behavior here (as per GH's implementation) is that there's a visual indicator on-hover, and just the clickable-cursor might suffice.

(But I'm not Design Team, which should probably still weigh in.)

@ynx0
Copy link
Contributor

ynx0 commented Jan 20, 2021

I was missing this feature as well. I think that readthedocs.io does this well, where they show a some sort of symbol next to the title on hover, along with some alt-text saying something like "Permalink to this headline". I have seen a pilcrow and a chain (to symbolize a link) being used.

@tylershuster
Copy link
Contributor

@ynx0 ynx0 mentioned this issue Jan 20, 2021
@ynx0
Copy link
Contributor

ynx0 commented Jan 20, 2021

I decided to try my hand at it and created a draft pr (#551). Please let me know what you think.

@ynx0
Copy link
Contributor

ynx0 commented Mar 26, 2021

I think #551 resolves this.

@Fang-
Copy link
Contributor Author

Fang- commented Mar 26, 2021

Doesn't look like #551 affected the getting started section of the docs, but otherwise, hurray!

@ynx0
Copy link
Contributor

ynx0 commented Mar 26, 2021

Oh yeah, that's cause I didn't know which parts of the docs to enable them so I just did a couple of them that made sense at the time... Enabling/disabling can be done with the anchors.py script.

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

4 participants