Modern documentation made simple and powerful
TinaDocs is a complete documentation solution built with Tina CMS that combines developer-friendly tools with content creator accessibility.

Figure: Landing Page of TinaDocs
The fastest way to get started with TinaDocs is using npx:
npx create-tina-app@latest my-docs --template tina-docs
This command will:
my-docsWhen using npx, you can choose from these beautiful themes:
There are two ways you can use TinaDocs:
• For developers – as a launching point to develops a highly custom docs solution. TinaCMS is based on markdown. Use this code as a basis to implement custom components to be used in MDX to fit your use case. Follow the Getting Started guide below.
• Quickest experience – use as is and deploy in minutes via TinaCloud for a docs setup that you still hold all the keys and data for, and get to using right away.
💡 TinaCMS integrates tighly with GitHub, and has a powerful editorial workflow based on GitHub's branch protection features.
💡 We recommend
pnpmfor faster installs. Learn why pnpm is great for Node.js projects.
pnpm install
pnpm dev
Open http://localhost:3000 to see your docs in action.
.env.example to .envNEXT_PUBLIC_TINA_CLIENT_ID=<get this from app.tina.io>
TINA_TOKEN=<get this from app.tina.io>
NEXT_PUBLIC_TINA_BRANCH=<your content branch>
NEXT_PUBLIC_ENABLE_THEME_SELECTION=<display theme selector>
If you want to test pnpm build locally, you need to add:
NEXT_PUBLIC_SITE_URL=http://localhost:3000
Theme Preview Mode:
To enable a theme selector in the UI for previewing all themes, add:
NEXT_PUBLIC_ENABLE_THEME_SELECTION=true
💡 Note: The theme selector allows you to preview different themes in real-time, but these changes are temporary and won't persist when you open a new browser window/tab. To make a theme permanent, update the
Selected Themfield in your Settings through TinaCMS.
pnpm build
TinaDocs works great with Vercel. Check out our deployment guide for detailed instructions.
TinaDocs includes fast search powered by Pagefind, which indexes your content during the build process.
To generate or update the search index, run:
pnpm build-local-pagefind
This command:
Builds the project
Generates the search index
Saves the index files to public/pagefind/
The search index is automatically updated every time you run the build.
Want to create your own custom theme? TinaDocs includes a comprehensive theming system that allows you to create custom color schemes. See the Custom Theming section below for detailed instructions on how to create and implement your own themes.
TinaDocs includes a comprehensive theming system that allows you to create custom color schemes. The theme system is built on CSS custom properties (variables) and supports both light and dark modes.
Themes in TinaDocs are implemented using CSS custom properties defined in src/styles/global.css. Each theme has:
Each theme follows this pattern in global.css:
/* LIGHT MODE */
.theme-your-theme {
--brand-primary: #your-primary-color;
--brand-primary-hover: #your-primary-hover;
--brand-primary-light: #your-primary-light;
--brand-primary-text: #your-primary-text;
--brand-primary-contrast: #your-primary-contrast;
--brand-primary-gradient-start: #your-gradient-start;
--brand-primary-gradient-end: #your-gradient-end;
/* ... more brand colors ... */
--neutral-background: #your-background;
--neutral-surface: #your-surface;
--neutral-text: #your-text;
--neutral-border: #your-border;
--background-color: #your-page-background;
}
/* DARK MODE */
.theme-your-theme.dark {
/* Dark mode variants of all the above colors */
}
To create a new custom theme, follow these steps:
src/styles/global.cssAdd your theme's CSS variables after the existing themes:
/* YOUR CUSTOM THEME */
.theme-custom {
--brand-primary: #your-primary-color;
--brand-primary-hover: #your-primary-hover;
--brand-primary-light: #your-primary-light;
--brand-primary-text: #your-primary-text;
--brand-primary-contrast: #your-primary-contrast;
--brand-primary-gradient-start: #your-gradient-start;
--brand-primary-gradient-end: #your-gradient-end;
--brand-secondary: #your-secondary-color;
--brand-secondary-hover: #your-secondary-hover;
--brand-secondary-light: #your-secondary-light;
--brand-secondary-text: #your-secondary-text;
--brand-secondary-contrast: #your-secondary-contrast;
--brand-secondary-gradient-start: #your-secondary-gradient-start;
--brand-secondary-gradient-end: #your-secondary-gradient-end;
--brand-tertiary: #your-tertiary-color;
--brand-tertiary-hover: #your-tertiary-hover;
--brand-tertiary-light: #your-tertiary-light;
--brand-tertiary-text: #your-tertiary-text;
--brand-tertiary-contrast: #your-tertiary-contrast;
--brand-tertiary-gradient-start: #your-tertiary-gradient-start;
--brand-tertiary-gradient-end: #your-tertiary-gradient-end;
--glass-gradient-start: rgba(255, 255, 255, 0.1);
--glass-gradient-end: rgba(255, 255, 255, 0.4);
--neutral-background: #your-background;
--neutral-background-secondary: #your-secondary-background;
--neutral-surface: #your-surface;
--neutral-text: #your-text;
--neutral-text-secondary: #your-secondary-text;
--neutral-border: #your-border;
--neutral-border-subtle: #your-subtle-border;
--background-color: #your-page-background;
}
.theme-custom.dark {
/* Dark mode variants - invert or adjust colors for dark mode */
--brand-primary: #your-dark-primary;
--brand-primary-hover: #your-dark-primary-hover;
/* ... continue with all other variables ... */
--neutral-background: #your-dark-background;
--neutral-surface: #your-dark-surface;
--neutral-text: #your-dark-text;
/* ... etc ... */
}
Update tina/customFields/theme-selector.tsx to include your new theme:
const themes = [
// ... existing themes ...
{
value: "custom",
label: "Custom",
description: "Your custom theme description",
colors: {
primary: "#your-primary-color",
secondary: "#your-secondary-color",
accent: "#your-accent-color",
},
},
];
Update src/components/ui/theme-selector.tsx to include your theme in the themes array:
const themes = ["default", "tina", "blossom", "lake", "pine", "indigo", "custom"];
When creating custom themes, consider these guidelines:
To test your custom theme:
NEXT_PUBLIC_ENABLE_THEME_SELECTION=trueThe existing themes demonstrate different approaches:
Each theme includes comprehensive color variations for different UI states and accessibility considerations.
TinaDocs includes helpful utility scripts to manage your documentation project:
Completely reset your documentation structure to start fresh:
pnpm run cleanup
What it does:
content/docs/ (preserves only index.mdx)content/apiSchema/.next folder) to prevent stale page references🚨 CRITICAL WARNING:
This command PERMANENTLY DELETES all documentation content.
- ❌ If you've already made changes, running cleanup will DELETE your work
- ✅ Run cleanup FIRST if you want a clean slate, then make your changes
- ✅ Commit your changes to git before running cleanup if you want to preserve them
This action cannot be undone unless you have committed your changes to version control.
⚠️ Important: After running cleanup, you must restart your development server with
pnpm devto ensure Next.js rebuilds the site without cached references to deleted pages.
For detailed information about available scripts, see scripts/README.md.
TinaDocs provides comprehensive API documentation capabilities powered by OpenAPI specifications. Generate beautiful, interactive API documentation directly from your OpenAPI/Swagger JSON files.
🔄 Dynamic Content Management
Currently, TinaDocs does not support:
For detailed instructions, see the API Documentation Guide and OpenAPI Spec Documentation.
Ready to improve your documentation? Give TinaDocs a try!