-
Notifications
You must be signed in to change notification settings - Fork 49
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
blog: Add anchor links to headings #1091
Conversation
"See the variable/function definition" should implicitly be the thing to do if one wants to inspect further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagging that right now with the split between the Page and App routers, we also have static-site/src/util/parseMarkdown.js. I think we want to keep the two in-sync?
Hmm, I think it's reasonable to have different Markdown parsing based on each of the 3 usages:
Anchor links are only relevant for blog posts and I don't see the other two benefitting from this functionality. I can rewrite |
+1 for both of these |
These are meant to stay on the same page.
Add a reference and mention globals.css as an alternative. This is not ideal since it adds unnecessary/unused styles for other pages, but this is the easiest thing to do in absence of a more specific static CSS file. CSS modules cannot be easily used since the class names are dynamically generated and meant for React/Next.js components.
ac19562
to
5548769
Compare
This commit adds GitHub-style anchor links¹ to heading elements. I also added a '#' on hover. ¹ https://github.com/markedjs/marked/blob/10020d018d4448b1d2d4612baf650c4e3a5949bf/docs/USING_PRO.md#the-renderer--renderer
5548769
to
ea6f00f
Compare
preview
Description of proposed changes
This PR adds GitHub-style anchor links to heading elements. I also added a '#' on hover. See commits for details.
Related issue(s)
N/A, thought of this while working on #1089
Checklist