souporserious / mdxts

The Content and Documentation SDK for React

Home Page:https://mdxts.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MDXTS

The Content & Documentation SDK for React

MDXTS is a collection of components and utilities for rendering
MDX content, type documentation, and code examples in React.

Features

  • πŸ“ Quickly start authoring MDX
  • βœ… Type-check content
  • πŸ“˜ Generate type documentation
  • πŸ“Š Gather module metadata
  • πŸ–ΌοΈ Preview source code examples
  • πŸ“ Generate file-based routes
  • 🌈 Accurately highlight code blocks

Getting Started

Using MDXTS in Next.js is currently the easiest way to get started. Follow the manual setup or use the CLI in a Next.js project to automate the plugin configuration:

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

https://mdxts.dev

License:MIT License


Languages

Language:TypeScript 85.4%Language:MDX 6.6%Language:JavaScript 4.2%Language:CSS 3.7%