Skip to content

feat: add line anchors transformer for shiki#8

Merged
pheralb merged 2 commits intopheralb:mainfrom
uvenkatateja:feat/add-line-anchors-transformer
Feb 11, 2026
Merged

feat: add line anchors transformer for shiki#8
pheralb merged 2 commits intopheralb:mainfrom
uvenkatateja:feat/add-line-anchors-transformer

Conversation

@uvenkatateja
Copy link
Contributor

Adds a transformer to enable clickable anchor links on line numbers, similar to GitHub's line linking feature.

What's Added

  • line-anchors.ts transformer - Adds id attributes to each line (L1, L2, etc.)
  • Documentation page following existing patterns
  • CSS styles for targeted line highlighting
  • Registry entry for shadcn/ui CLI
  • Sidebar navigation entry

Usage

Works automatically with lineNumbers transformer. Users can link to specific lines using #L5 in URLs.

Why

Enables easy reference and sharing of specific code lines in documentation, similar to GitHub/GitLab.

@vercel
Copy link

vercel bot commented Feb 11, 2026

@uvenkatateja is attempting to deploy a commit to the Pablo Hdez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
code-blocks Ready Ready Preview, Comment Feb 11, 2026 6:18pm

@pheralb
Copy link
Owner

pheralb commented Feb 11, 2026

I like it! But I think we need to add an example of how to use it 👀

@pheralb
Copy link
Owner

pheralb commented Feb 11, 2026

Thanks 🚀

@pheralb pheralb merged commit 9d29fde into pheralb:main Feb 11, 2026
4 checks passed
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

Comments