Skip to content

fix: add fragments to headings#1807

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

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

Conversation

@vladh
Copy link
Contributor

@vladh vladh commented Mar 1, 2026

🔗 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
Copy link

vercel bot commented Mar 1, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Mar 2, 2026 0:44am
npmx.dev Ready Ready Preview, Comment Mar 2, 2026 0:44am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Mar 2, 2026 0:44am

Request Review

@codecov
Copy link

codecov bot commented Mar 1, 2026

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
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

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 name Status Explanation
Description check ✅ Passed The 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
Copy link
Contributor Author

vladh commented Mar 1, 2026

“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 vladh force-pushed the add-blog-heading-anchors branch from df01762 to 2e40fdd Compare March 2, 2026 00:42
@vladh vladh changed the title fix(blog): add fragments to headings fix: add fragments to headings Mar 2, 2026
@danielroe danielroe added this pull request to the merge queue Mar 2, 2026
Merged via the queue into npmx-dev:main with commit 3f867d9 Mar 2, 2026
19 of 20 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