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

feat: support styling for heading link #5472

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

evanwhitten
Copy link

This PR enhances the documentation by adding clickable anchor links to each heading (h1 & h2).

Currently, while anchor links are generated via rehypeAutolinkHeadings, they are not accessible due to missing styles. This makes it difficult for users to obtain direct links to specific headings, hindering navigation and sharing.

Below is the example scenario, where I wanted to share useSidebar. Which as mentioned, is already a valid link but had no entry point.

Screenshot 2024-10-20 at 3 53 12 PM

Thanks so much for ShadCN!! ❤️

Copy link

vercel bot commented Oct 20, 2024

@evanwhitten is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Oct 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview Oct 21, 2024 7:35am

@shadcn
Copy link
Collaborator

shadcn commented Oct 21, 2024

oh thanks. that looks great. do you think we could make the heading itself clickable? easy?

@shadcn shadcn added enhancement New feature or request area: www postpone: more info or changes requested maintainers asked a question or needs more info labels Oct 21, 2024
@evanwhitten
Copy link
Author

oh thanks. that looks great. do you think we could make the heading itself clickable? easy?

@shadcn Updated!

Screenshot 2024-10-21 at 6 21 13 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: www enhancement New feature or request postpone: more info or changes requested maintainers asked a question or needs more info
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants