docs: configure typedoc to natively output .mdx extensions#438
docs: configure typedoc to natively output .mdx extensions#438successaje wants to merge 1 commit intozeta-chain:mainfrom
Conversation
- Ensures generated doc outputs align with the main docs repository .mdx conversion logic
📝 WalkthroughWalkthroughTwo configuration and documentation updates: README.md whitespace formatting adjustment around the Installation section, and typedoc.json extended to recognize MDX files via fileExtension setting. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
|
||
| ## 📦 Installation | ||
|
|
||
There was a problem hiding this comment.
Trailing whitespace introduced
Line 19 was changed from an empty line to a line with a single trailing space ( ). This is unintentional whitespace that should remain a blank line.
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 19
Comment:
**Trailing whitespace introduced**
Line 19 was changed from an empty line to a line with a single trailing space (` `). This is unintentional whitespace that should remain a blank line.
```suggestion
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Line 19: Remove the whitespace-only line immediately under the "Installation"
heading in README.md so it becomes a true blank line (delete the space character
on that line), then save the file to avoid markdown lint/style noise.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7dfeb895-b3b1-40e1-8e26-90347a237cfd
⛔ Files ignored due to path filters (3)
docs/index.mdxis excluded by!docs/**package-lock.jsonis excluded by!**/package-lock.jsonyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
README.mdtypedoc.json
|
|
||
| ## 📦 Installation | ||
|
|
||
There was a problem hiding this comment.
Remove the whitespace-only line under Installation.
Line 19 is just a space character. This can trigger markdown lint/style noise; keep it as a true blank line.
Proposed fix
-
+📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` at line 19, Remove the whitespace-only line immediately under the
"Installation" heading in README.md so it becomes a true blank line (delete the
space character on that line), then save the file to avoid markdown lint/style
noise.
This PR updates the TypeDoc configuration to ensure that all auto-generated toolkit SDK documentation correctly outputs .mdx files instead of standard .md files.
Why is this needed?
The zeta-chain/docs site recently migrated to a .mdx structure to support enhanced rendering and MDX components. However, because the toolkit's TypeDoc generator was still outputting standard .md files, this caused compatibility issues with the auto-sync pipeline and broke the "Improve this documentation via GitHub" links on the main docs site (since the site expected a .mdx file but the source of truth remained .md).
Changes Made
Updated /toolkit/typedoc.json to include the fileExtension: ".mdx" property for typedoc-plugin-markdown.
This simple configuration enforces .mdx consistency down to the code generators themselves, completely resolving synchronization friction.
Related Issue
#633
Testing
Ran npm install and npm run docs locally within the toolkit/ directory.
Verified that all output elements inside the docs/ folder are correctly saved with the .mdx extension without any parsing errors.
Summary by CodeRabbit
Greptile Summary
This PR configures TypeDoc to emit
.mdxfiles instead of.mdby adding"fileExtension": ".mdx"totypedoc.json, and renames the existingdocs/index.mdtodocs/index.mdxto match. The core configuration change is correct and well-scoped.package-lock.jsonshould not be committed. The project declaresyarnas its package manager ("packageManager": "yarn@1.22.21+..."inpackage.json) and the canonical lock file isyarn.lock. Thepackage-lock.jsonwas generated by runningnpm installduring local testing and its presence will cause dependency resolution inconsistencies. It should be removed and added to.gitignore.Confidence Score: 4/5
Safe to merge once the erroneous package-lock.json is removed
The typedoc configuration change is correct and minimal. The P1 concern is the accidentally committed package-lock.json from running npm install during testing — it should be removed before merging to avoid lock-file conflicts in this yarn-managed project.
package-lock.json should be removed entirely; also verify yarn.lock reflects only intentional dependency changes
Important Files Changed
"fileExtension": ".mdx"to configure typedoc-plugin-markdown to emit .mdx files — correct placement and valid optionFlowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[typedoc.json\nfileExtension: .mdx] --> B[typedoc-plugin-markdown] B --> C[Generate docs/] C --> D[docs/index.mdx] C --> E[docs/*.mdx\nall other pages] D --> F[zeta-chain/docs\nauto-sync pipeline] E --> F F --> G[docs site\n.mdx rendering]Comments Outside Diff (1)
package-lock.json, line 1 (link)This
package-lock.jsonwas generated by runningnpm installduring local testing (per the PR description) and should not be committed. The project explicitly declares"packageManager": "yarn@1.22.21+..."inpackage.json, and the canonical lock file isyarn.lock. Committing both lock files in parallel will cause dependency resolution inconsistencies for developers and CI pipelines that useyarn, and may silently diverge over time since only one file gets updated per tool. Thepackage-lock.jsonshould be removed from this PR andpackage-lock.jsonadded to.gitignore.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "chore: updated the typedoc config to out..." | Re-trigger Greptile