Skip to content

fix: add fragments to headings - #1807

Merged
danielroe merged 1 commit into
npmx-dev:mainfrom
vladh:add-blog-heading-anchors
Mar 2, 2026
Merged

fix: add fragments to headings#1807
danielroe merged 1 commit into
npmx-dev:mainfrom
vladh:add-blog-heading-anchors

Conversation

@vladh

@vladhvladh commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

This fix was trivial so I decided to just create a PR.

🧭 Context

On the blog, headings do not have fragments, so cannot be linked to:

<h2>The need for npmx</h2>

📚 Description

I used markdown-it-anchor to automatically add fragments to headings:

<h2 id="the-need-for-npmx" tabindex="-1">The need for npmx</h2>

@vercel

vercelBot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devReadyReadyPreview, CommentMar 2, 2026 0:44am
npmx.devReadyReadyPreview, CommentMar 2, 2026 0:44am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
npmx-lunariaIgnoredIgnoredMar 2, 2026 0:44am

Request Review

@codecov

codecovBot commented Mar 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai

coderabbitaiBot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df01762 and 2e40fdd.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • modules/blog.ts
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • modules/blog.ts

📝 Walkthrough

Walkthrough

Imports and registers the markdown-it-anchor plugin in the blog module's Markdown-it setup (calls md.use(MarkdownItAnchor)) and adds the "markdown-it-anchor" dependency to package.json. No other control-flow or public API changes were made.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check nameStatusExplanation
Description check✅ PassedThe pull request description clearly explains the problem (headings lack fragments for linking) and describes the solution (integrating markdown-it-anchor plugin).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vladh

vladh commented Mar 1, 2026

Copy link
Copy Markdown
ContributorAuthor

“Validate PR title” failure addressed in #1808.

Changing the PR title and commit message to one that will pass the tests, to make this ready for review.

@vladh
vladhforce-pushed the add-blog-heading-anchors branch from df01762 to 2e40fddCompareMarch 2, 2026 00:42
@vladhvladh changed the title fix(blog): add fragments to headingsfix: add fragments to headingsMar 2, 2026
@danielroe
danielroe added this pull request to the merge queueMar 2, 2026
Merged via the queue into npmx-dev:main with commit 3f867d9Mar 2, 2026
19 of 20 checks passed
Sign up for freeto 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

@vladh@danielroe