Skip to content

feat: integrate fumadocs for documentation#5

Merged
phev8 merged 2 commits intomainfrom
fumadocs-setup
Feb 24, 2026
Merged

feat: integrate fumadocs for documentation#5
phev8 merged 2 commits intomainfrom
fumadocs-setup

Conversation

@phev8
Copy link
Contributor

@phev8 phev8 commented Feb 24, 2026

No description provided.

… configuration, and update README with installation instructions
@greptile-apps
Copy link

greptile-apps bot commented Feb 24, 2026

Greptile Summary

This PR integrates Fumadocs as the documentation framework for the c-ui component registry. The original homepage content was migrated to a structured documentation site with individual component pages featuring installation instructions, live interactive examples, usage code, and configuration tables.

Key changes:

  • Installed fumadocs-core, fumadocs-ui, and fumadocs-mdx packages
  • Created /docs route with dynamic [[...slug]] page using generateStaticParams for static export compatibility
  • Moved interactive examples from app/ to components/docs/ and added Dialog examples
  • Created comprehensive MDX documentation for all 5 components (alert-provider, button, confirm, dialog, loading-button)
  • Configured fumadocs source loader pointing to content/docs directory
  • Root page now redirects to /docs instead of displaying the registry showcase
  • Updated README to focus on contributors, referring end-users to the docs site
  • Added suppressHydrationWarning to support theme switching
  • Changed fumadocs theme from neutral to shadcn for visual consistency

The implementation is well-structured and properly configured for Next.js static export with the existing basePath: "/c-ui" and GitHub Pages deployment.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fumadocs integration is clean and well-implemented with proper static export configuration. All files follow established patterns, the dynamic route includes generateStaticParams for static generation, and the interactive examples correctly import from @/registry/radix-nova/ paths. The documentation is comprehensive and well-structured. No logical errors, security issues, or breaking changes were found.
  • No files require special attention

Important Files Changed

Filename Overview
package.json Added fumadocs dependencies (fumadocs-core, fumadocs-ui, fumadocs-mdx) for documentation framework
source.config.ts Created fumadocs configuration pointing to content/docs directory
lib/source.ts Created fumadocs loader for MDX content with /docs base URL
app/layout.tsx Wrapped app with RootProvider and added suppressHydrationWarning for theme support
app/page.tsx Simplified to redirect to /docs, moving registry showcase to documentation
app/docs/[[...slug]]/page.tsx Dynamic route handler with generateStaticParams for static export compatibility
next.config.mjs Integrated fumadocs MDX plugin with existing static export configuration
tsconfig.json Added fumadocs-mdx:collections path mapping to .source directory
content/docs/index.mdx Getting started documentation with installation instructions and component overview
components/docs/interactive-examples.tsx Moved from app/ and enhanced with Dialog examples for MDX documentation

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Root /] --> B[app/page.tsx]
    B --> C[redirect to /docs]
    C --> D[app/docs/layout.tsx]
    D --> E[DocsLayout with pageTree]
    D --> F[Dynamic slug page]
    F --> G{getPage from source}
    G -->|found| H[Render MDX with DocsPage]
    G -->|not found| I[notFound]
    
    J[content/docs MDX files] --> K[fumadocs-mdx]
    K --> L[.source directory]
    L --> M[lib/source.ts loader]
    M --> G
    
    N[source.config.ts] --> K
    O[tsconfig.json paths] --> L
    
    H --> P[Interactive Examples]
    P --> Q[components/docs]
    Q --> R[registry/radix-nova components]
    
    style C fill:#e1f5ff
    style H fill:#d4edda
    style K fill:#fff3cd
    style R fill:#f8d7da
Loading

Last reviewed commit: 6d747fb

…kage.json; enhance README with build and start instructions
@phev8 phev8 merged commit 0ffedde into main Feb 24, 2026
2 checks passed
@phev8 phev8 deleted the fumadocs-setup branch February 24, 2026 15:33
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.

1 participant