Skip to content

Link docs refs across Fedify packages#723

Merged
dahlia merged 2 commits intofedify-dev:mainfrom
dahlia:docs/jsr-ref
Apr 25, 2026
Merged

Link docs refs across Fedify packages#723
dahlia merged 2 commits intofedify-dev:mainfrom
dahlia:docs/jsr-ref

Conversation

@dahlia
Copy link
Copy Markdown
Member

@dahlia dahlia commented Apr 25, 2026

What changed

This updates the VitePress Markdown-It setup in docs/.vitepress/config.mts so markdown-it-jsr-ref loads API indexes for the Fedify packages that are referenced across the docs: @fedify/fedify, @fedify/vocab, @fedify/vocab-runtime, @fedify/webfinger, @fedify/debugger, and @fedify/testing.

Each package now gets its own cache file, and those generated cache files are ignored in docs/.gitignore.

This also updates markdown-it-jsr-ref from 0.4.1 to 0.4.4 in docs/package.json and pnpm-lock.yaml. The newer version chains inline code renderers correctly, so multiple JSR reference indexes can be active at the same time.

Why

The docs had inline code references such as Create, Object.published, Object.name, ~Activity.getObject(), and Activity.fromJsonLd() that should link to JSR API pages but no longer did. Some of those symbols live in @fedify/vocab, not @fedify/fedify, and markdown-it-jsr-ref 0.4.1 could not safely compose multiple package indexes because each plugin instance replaced the previous inline code renderer.

Verification

I checked that Create, Object.published, Object.name, ~Object.names, Activity.fromJsonLd(), and Context.sendActivity() all render as JSR links when the configured package indexes are loaded together.

I also verified the rendered docs/manual/vocab.md page in a fresh VitePress dev server and confirmed that the affected inline code references link to the expected JSR API pages.

The commit hook ran deno fmt --check, hongdown --check, deno check, deno lint, and the workspace protocol check successfully.

Configure the VitePress JSR reference plugin for the Fedify packages whose
APIs are referenced throughout the docs, including vocab, webfinger,
debugger, testing, and vocab-runtime.  Keep separate cache files for each
package so the generated indexes do not overwrite each other.

Update markdown-it-jsr-ref to a version that chains inline code renderers,
which allows multiple package indexes to be active at the same time.

Assisted-by: Codex:gpt-5.5
@dahlia dahlia added this to the Fedify 2.2 milestone Apr 25, 2026
@dahlia dahlia requested a review from Copilot April 25, 2026 03:13
@dahlia dahlia self-assigned this Apr 25, 2026
@dahlia dahlia added type/bug Something isn't working type/documentation Improvements or additions to documentation labels Apr 25, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f5c1dcf7-9a00-4e70-8fd6-08c071914de0

📥 Commits

Reviewing files that changed from the base of the PR and between 94d98c0 and afc626e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • docs/.gitignore
  • docs/.vitepress/config.mts
  • docs/package.json

📝 Walkthrough

Walkthrough

Updates documentation build configuration to support multiple @fedify packages with JSR reference plugins. A cache file exclusion pattern and dependency version bump complement configuration changes that replicate plugin instances across packages.

Changes

Cohort / File(s) Summary
Cache Configuration
docs/.gitignore
Adds .jsr-*-cache.json pattern to exclude versioned JSR cache files.
JSR Plugin Setup
docs/.vitepress/config.mts
Expands single @fedify/fedify plugin instance to multiple instances for fedify, vocab, vocab-runtime, webfinger, debugger, and testing packages, each with isolated cache file paths.
Dependency Update
docs/package.json
Updates markdown-it-jsr-ref from 0.4.1 to 0.4.4.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • sij411
  • 2chanhaeng
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Link docs refs across Fedify packages' clearly and concisely summarizes the main change: configuring the documentation build to support JSR references across multiple Fedify packages.
Description check ✅ Passed The description thoroughly explains what changed, why it was needed, and how it was verified, directly relating to the changeset involving VitePress config, .gitignore, package.json updates, and the markdown-it-jsr-ref plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 25, 2026

@codex review

@issues-auto-labeler issues-auto-labeler Bot added component/build Build system and packaging component/cli CLI tools related component/federation Federation object related labels Apr 25, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the documentation setup to support multiple JSR packages by dynamically initializing jsrRef plugins for various @fedify packages in docs/.vitepress/config.mts. It also updates the markdown-it-jsr-ref dependency and adds several JSR cache files to docs/.gitignore. Feedback recommends using a wildcard pattern in docs/.gitignore to simplify the file and improve maintainability.

Comment thread docs/.gitignore Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the docs site’s Markdown-It configuration so inline code references can link to JSR API docs across multiple Fedify packages, backed by per-package cached indexes.

Changes:

  • Load markdown-it-jsr-ref indexes for multiple @fedify/* packages in VitePress Markdown config.
  • Split JSR ref cache into per-package cache files and ignore them in docs/.gitignore.
  • Bump markdown-it-jsr-ref from 0.4.1 to 0.4.4.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
pnpm-lock.yaml Updates the lockfile for the markdown-it-jsr-ref bump (plus additional dependency/catalog resolution changes).
docs/package.json Bumps markdown-it-jsr-ref to 0.4.4.
docs/.vitepress/config.mts Loads multiple JSR reference indexes and applies all plugin instances to Markdown-It.
docs/.gitignore Ignores the new per-package JSR cache files.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread pnpm-lock.yaml
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Use a wildcard ignore pattern for generated JSR reference cache files so new
package-specific caches do not require separate ignore entries.

Trim pnpm-lock.yaml so the dependency update only records the
markdown-it-jsr-ref version change and avoids unrelated transitive churn.

fedify-dev#723 (comment)
fedify-dev#723 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia dahlia requested a review from Copilot April 25, 2026 03:19
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 25, 2026

@codex review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dahlia dahlia marked this pull request as ready for review April 25, 2026 03:26
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dahlia dahlia merged commit 31b6778 into fedify-dev:main Apr 25, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/build Build system and packaging component/cli CLI tools related component/federation Federation object related type/bug Something isn't working type/documentation Improvements or additions to documentation

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants