Skip to content

docs: configure typedoc to natively output .mdx extensions#438

Open
successaje wants to merge 1 commit intozeta-chain:mainfrom
successaje:main
Open

docs: configure typedoc to natively output .mdx extensions#438
successaje wants to merge 1 commit intozeta-chain:mainfrom
successaje:main

Conversation

@successaje
Copy link
Copy Markdown

@successaje successaje commented Apr 20, 2026

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

  • Documentation
    • Extended documentation generation to support MDX file format in addition to existing formats.
  • Style
    • Minor formatting adjustments to README.

Greptile Summary

This PR configures TypeDoc to emit .mdx files instead of .md by adding "fileExtension": ".mdx" to typedoc.json, and renames the existing docs/index.md to docs/index.mdx to match. The core configuration change is correct and well-scoped.

  • P1 — package-lock.json should not be committed. The project declares yarn as its package manager ("packageManager": "yarn@1.22.21+..." in package.json) and the canonical lock file is yarn.lock. The package-lock.json was generated by running npm install during 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

Filename Overview
typedoc.json Adds "fileExtension": ".mdx" to configure typedoc-plugin-markdown to emit .mdx files — correct placement and valid option
docs/index.mdx Renamed from index.md to index.mdx with correct frontmatter; introduces a trailing space on line 23 (after the Installation heading)
package-lock.json New 23,000-line npm lock file added to a project that uses yarn — should not be committed alongside yarn.lock
README.md Minor unintentional trailing space change after the Installation heading
yarn.lock Lock file updated to reflect new typedoc/typedoc-plugin-markdown dependency versions

Flowchart

%%{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]
Loading

Comments Outside Diff (1)

  1. package-lock.json, line 1 (link)

    P1 npm lock file committed to a yarn project

    This package-lock.json was generated by running npm install during local testing (per the PR description) and should not be committed. The project explicitly declares "packageManager": "yarn@1.22.21+..." in package.json, and the canonical lock file is yarn.lock. Committing both lock files in parallel will cause dependency resolution inconsistencies for developers and CI pipelines that use yarn, and may silently diverge over time since only one file gets updated per tool. The package-lock.json should be removed from this PR and package-lock.json added to .gitignore.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: package-lock.json
    Line: 1
    
    Comment:
    **npm lock file committed to a yarn project**
    
    This `package-lock.json` was generated by running `npm install` during local testing (per the PR description) and should not be committed. The project explicitly declares `"packageManager": "yarn@1.22.21+..."` in `package.json`, and the canonical lock file is `yarn.lock`. Committing both lock files in parallel will cause dependency resolution inconsistencies for developers and CI pipelines that use `yarn`, and may silently diverge over time since only one file gets updated per tool. The `package-lock.json` should be removed from this PR and `package-lock.json` added to `.gitignore`.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: package-lock.json
Line: 1

Comment:
**npm lock file committed to a yarn project**

This `package-lock.json` was generated by running `npm install` during local testing (per the PR description) and should not be committed. The project explicitly declares `"packageManager": "yarn@1.22.21+..."` in `package.json`, and the canonical lock file is `yarn.lock`. Committing both lock files in parallel will cause dependency resolution inconsistencies for developers and CI pipelines that use `yarn`, and may silently diverge over time since only one file gets updated per tool. The `package-lock.json` should be removed from this PR and `package-lock.json` added to `.gitignore`.

How can I resolve this? If you propose a fix, please make it concise.

---

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.

Reviews (1): Last reviewed commit: "chore: updated the typedoc config to out..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

- Ensures generated doc outputs align with the main docs repository .mdx conversion logic
@successaje successaje requested review from a team as code owners April 20, 2026 10:20
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

📝 Walkthrough

Walkthrough

Two 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

Cohort / File(s) Summary
Documentation
README.md
Adjusted whitespace formatting by replacing an empty line after the "## 📦 Installation" heading with a whitespace-only line before the bash code block.
Configuration
typedoc.json
Added fileExtension setting configured to .mdx to extend documentation input handling for MDX files.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: configuring typedoc to output .mdx extensions, which is the primary objective of this PR.

✏️ 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.

Comment thread README.md

## 📦 Installation

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

Suggested change
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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 184af34 and 4776753.

⛔ Files ignored due to path filters (3)
  • docs/index.mdx is excluded by !docs/**
  • package-lock.json is excluded by !**/package-lock.json
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • README.md
  • typedoc.json

Comment thread README.md

## 📦 Installation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
🤖 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.

@successaje successaje changed the title Configure typedoc to natively output .mdx extensions docs: configure typedoc to natively output .mdx extensions Apr 20, 2026
@github-actions github-actions Bot added the docs label Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant