Skip to content
/ mdxts Public
forked from souporserious/renoun

The Content and Documentation SDK for React

License

Notifications You must be signed in to change notification settings

Teglez/mdxts

 
 

Repository files navigation

MDXTS

The Content & Documentation SDK for React

MDXTS (Beta) is a collection of components and utilities for rendering content, type documentation, and code examples using React Server Components.

Features

  • ✅ Type-checked content
  • 📄 Generated type documentation
  • 🔍 Source code previews
  • 📁 File-based routing
  • 🎨 Accurate syntax highlighting

Getting Started

Next.js is currently the easiest way to use MDXTS and has first-class support through a plugin. Use the CLI in a Next.js project to get started:

npm create mdxts

After installing the package and required dependencies, you can start creating content or documentation using MDX. Simply render MDX as pages or use the createSource function to create a source for rendering a collection of MDX files:

import { createSource } from 'mdxts'

const posts = createSource('docs/*.mdx')

export default async function Page({ params }) {
  const { Content } = await posts.get(params.slug)
  return <Content />
}

Visit the Getting Started guide to view the full documentation and learn more about the features and capabilities of MDXTS.

License

MIT © souporserious

About

The Content and Documentation SDK for React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.5%
  • MDX 5.3%
  • JavaScript 4.9%
  • CSS 3.3%