mdx-tailwind-docs
Create beautiful documentation site all in markdown with full control over your project
Quick Start
frame-master create --template mdx-tailwind-docsTip: You can specify a different version by using the GitHub release URL:
frame-master create --template https://github.com/shpaw415/frame-master-template-mdx-doc-site@vX.Y.ZAbout This Template
README from GitHubFrame Master Template: MDX Documentation Site
A modern, high-performance starter template for building documentation sites with MDX, React, and Tailwind CSS, Ready for CDN.
š Features
- MDX Support: Write documentation in Markdown with embedded React components
- React 19: The latest version of React for building interactive UIs
- Tailwind CSS: Utility-first CSS framework with Typography plugin
- Pre-built Components: Ready-to-use Header and Footer components
- Site Configuration: Centralized config file for easy customization
- Frame Master: Integrated workflow for seamless development
- Bun: Lightning-fast JavaScript runtime and package manager
- TypeScript: Type-safe development for better code quality
š Project Structure
src/
āāā site.config.ts # āļø Site configuration (name, links, nav, etc.)
āāā shell.tsx # HTML shell wrapper
āāā common.ts # Shared utilities
āāā components/
ā āāā index.ts # Components barrel export
ā āāā Header.tsx # Site header with navigation
ā āāā Footer.tsx # Site footer with links
āāā pages/
āāā layout.tsx # Page layout wrapper
āāā index.mdx # Home page
static/
āāā style.css # Compiled Tailwind CSS
āāā tailwind.css # Tailwind source
āāā favicon.svg # Site favicon
š ļø Getting Started
Prerequisites
- Bun (v1.3 or later)
Installation
-
Clone the repository (or use the template):
git clone <your-repo-url> cd <your-project-directory> -
Install dependencies:
bun install -
Initialize Frame Master:
bun frame-master init
Development
Start the development server with Hot Module Replacement (HMR):
bun run dev
Build for Production
bun run build
āļø Configuration
Site Configuration (src/site.config.ts)
The main configuration file for your documentation site. Update these values to customize your site:
export const siteConfig = {
// Site name displayed in header and title
name: "My Documentation",
// Site description for SEO
description: "Documentation site built with Frame Master",
// Author information
author: {
name: "Your Name",
url: "https://github.com/yourusername",
},
// Social links (leave empty to hide)
links: {
github: "https://github.com/yourusername/your-repo",
twitter: "https://twitter.com/yourusername",
discord: "",
},
// Navigation items
nav: [
{ label: "Home", href: "/" },
{ label: "Docs", href: "/docs" },
{ label: "Blog", href: "/blog" },
],
// Footer sections
footer: {
sections: [
{
title: "Documentation",
links: [
{ label: "Getting Started", href: "/docs/getting-started" },
// ...
],
},
],
copyright: "Ā© 2025 Your Project. All rights reserved.",
},
};
š Writing Documentation
Creating Pages
Add .mdx files in the src/pages directory:
src/pages/
āāā index.mdx # / (home)
āāā about.mdx # /about
āāā docs/
ā āāā index.mdx # /docs
ā āāā getting-started.mdx # /docs/getting-started
ā āāā api/
ā āāā index.mdx # /docs/api
Using Components in MDX
Import and use React components directly in your MDX files:
import { Alert } from "../components/Alert";
# My Page
<Alert type="info">This is an informational alert!</Alert>
Regular markdown content continues here...
Creating Custom Components
Add new components in src/components/:
// src/components/Alert.tsx
export function Alert({ type, children }) {
return <div className={`alert alert-${type}`}>{children}</div>;
}
Export from the barrel file:
// src/components/index.ts
export { Alert } from "./Alert";
š Deployment
Cloudflare Pages
- Push your code to GitHub
- Connect your repository to Cloudflare Pages
- Set build command:
bun run build - Set output directory:
.frame-master/build
Manual Deployment
bun run build
# Deploy the .frame-master/build directory to your hosting provider
š License
MIT License - feel free to use this template for any project!
