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 article heading anchors #49

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

runofthemillgeek
Copy link
Contributor

Adds heading anchors (#) that appear when user hovers over headings in articles. Clicking the anchor will scroll viewport until heading is aligned to top and update the address bar with the hash. This makes it easy to copy URLs that link to a specific heading in the article.

typo-heading-anchors.mp4

Adds heading anchors (#) that appear when user hovers over headings in
articles. Clicking the anchor will scroll viewport until heading is
aligned to top and update the address bar with the hash. This makes it
easy to copy URLs that link to a specific heading in the article.
@tomfran
Copy link
Owner

tomfran commented Nov 18, 2024

I like this idea, I don't love the visual aspect of it. Perhaps we can use monospace font for it? I guess we can also change this in the future, I'll merge in the meantime this is a great feature

@tomfran tomfran merged commit 5ee19e9 into tomfran:main Nov 18, 2024
@runofthemillgeek
Copy link
Contributor Author

I like this idea, I don't love the visual aspect of it. Perhaps we can use monospace font for it? I guess we can also change this in the future, I'll merge in the meantime this is a great feature

That might work out. Could also use an icon if we find it not quite right w.r.t centering. It definitely didn't seem perfect with the default font-face when I was testing it. I see that you've merged the monospace change also, will test out.

Worst case someone can always override the CSS :)

@runofthemillgeek runofthemillgeek deleted the feat/heading-anchors branch November 19, 2024 02:13
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

Successfully merging this pull request may close these issues.

2 participants