Skip to content

thequietmind/create-mdx-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-mdx-docs

Scaffold a new MDX Docs site in seconds.

Demo: https://mdxdocs.com/

GitHub: https://github.com/thequietmind/mdx-docs

Usage

Create a new project with mdx-docs

npx create-mdx-docs@latest my-docs

Change into the project root

cd my-docs

Install dependencies

npm install

Run the local development server

npm run dev

This creates a new directory my-docs/ with a ready-to-run documentation site powered by @quietmind/mdx-docs.

What's included

my-docs/
├── pages/
│   ├── index.mdx
│   └── getting-started.mdx
├── config/
│   ├── pages.js
│   └── site.js
├── src/
│   └── main.jsx
├── index.html
├── vite.config.js
└── package.json
  • pages/ — MDX content files, one per page
  • config/pages.js — registers pages and their routes
  • config/site.js — site name and description (set url to enable canonical tags and a generated sitemap.xml)
  • vite.config.js — pre-configured Vite setup via createMdxDocsConfig

Adding pages

Create an MDX file in pages/:

# My Page

Write **markdown** and use React components inline.

Register it in config/pages.js:

const MyPageMDX = lazy(() => import("@pages/my-page.mdx"));

export const pages = [
  // ...existing pages
  {
    name: "My Page",
    route: "/my-page",
    component: MyPageMDX,
  },
];

License

MIT

About

Scaffold a new MDX Docs site

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors