create-unmint 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +57 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +499 -0
  4. package/package.json +48 -0
  5. package/template/LICENSE +21 -0
  6. package/template/README.md +278 -0
  7. package/template/__tests__/components/callout.test.tsx +46 -0
  8. package/template/__tests__/components/card.test.tsx +59 -0
  9. package/template/__tests__/components/tabs.test.tsx +61 -0
  10. package/template/__tests__/theme-config.test.ts +49 -0
  11. package/template/__tests__/utils.test.ts +25 -0
  12. package/template/app/api/og/route.tsx +90 -0
  13. package/template/app/api/search/route.ts +6 -0
  14. package/template/app/components/docs/docs-pager.tsx +41 -0
  15. package/template/app/components/docs/docs-sidebar.tsx +143 -0
  16. package/template/app/components/docs/docs-toc.tsx +61 -0
  17. package/template/app/components/docs/mdx/accordion.tsx +54 -0
  18. package/template/app/components/docs/mdx/callout.tsx +102 -0
  19. package/template/app/components/docs/mdx/card.tsx +110 -0
  20. package/template/app/components/docs/mdx/code-block.tsx +42 -0
  21. package/template/app/components/docs/mdx/frame.tsx +14 -0
  22. package/template/app/components/docs/mdx/index.tsx +167 -0
  23. package/template/app/components/docs/mdx/pre.tsx +82 -0
  24. package/template/app/components/docs/mdx/steps.tsx +59 -0
  25. package/template/app/components/docs/mdx/tabs.tsx +60 -0
  26. package/template/app/components/docs/mdx/youtube.tsx +18 -0
  27. package/template/app/components/docs/search-dialog.tsx +281 -0
  28. package/template/app/components/docs/theme-toggle.tsx +35 -0
  29. package/template/app/docs/[[...slug]]/page.tsx +139 -0
  30. package/template/app/docs/layout.tsx +98 -0
  31. package/template/app/globals.css +151 -0
  32. package/template/app/layout.tsx +33 -0
  33. package/template/app/page.tsx +5 -0
  34. package/template/app/providers/theme-provider.tsx +8 -0
  35. package/template/content/docs/components.mdx +82 -0
  36. package/template/content/docs/customization.mdx +34 -0
  37. package/template/content/docs/deployment.mdx +28 -0
  38. package/template/content/docs/index.mdx +91 -0
  39. package/template/content/docs/meta.json +13 -0
  40. package/template/content/docs/quickstart.mdx +110 -0
  41. package/template/content/docs/theming.mdx +41 -0
  42. package/template/lib/docs-source.ts +7 -0
  43. package/template/lib/theme-config.ts +89 -0
  44. package/template/lib/utils.ts +6 -0
  45. package/template/next.config.mjs +10 -0
  46. package/template/package-lock.json +10695 -0
  47. package/template/package.json +45 -0
  48. package/template/postcss.config.mjs +7 -0
  49. package/template/public/logo.png +0 -0
  50. package/template/public/logo.svg +9 -0
  51. package/template/public/logo.txt +1 -0
  52. package/template/source.config.ts +22 -0
  53. package/template/tailwind.config.ts +34 -0
  54. package/template/tsconfig.json +33 -0
  55. package/template/vitest.config.ts +16 -0
@@ -0,0 +1,91 @@
1
+ ---
2
+ title: Welcome to Unmint
3
+ description: A free, open-source Mintlify-style documentation system
4
+ ---
5
+
6
+ Welcome to **Unmint** — a beautiful, customizable documentation system built with [Next.js](https://nextjs.org), [Fumadocs](https://fumadocs.vercel.app), and more (see [Built With](#built-with) below).
7
+
8
+ <CardGroup cols={2}>
9
+ <Card title="Quick Start" icon="rocket" href="/docs/quickstart">
10
+ Get up and running with Unmint in under 5 minutes.
11
+ </Card>
12
+ <Card title="Components" icon="code" href="/docs/components">
13
+ Explore all the MDX components available out of the box.
14
+ </Card>
15
+ <Card title="Theming" icon="gear" href="/docs/theming">
16
+ Customize colors, fonts, and branding to match your project.
17
+ </Card>
18
+ <Card title="Deployment" icon="rocket" href="/docs/deployment">
19
+ Deploy your docs to Vercel, Netlify, or any static host.
20
+ </Card>
21
+ </CardGroup>
22
+
23
+ ## What is Unmint?
24
+
25
+ Unmint is a **free and open-source** alternative to paid documentation platforms like Mintlify. It provides:
26
+
27
+ - **Beautiful out-of-the-box styling** that looks professional without customization
28
+ - **Full MDX support** with pre-built components (cards, callouts, tabs, steps, etc.)
29
+ - **Built-in search** powered by Fumadocs
30
+ - **Dynamic OG images** generated automatically for social sharing
31
+ - **Dark mode** with seamless theme switching
32
+ - **Easy customization** through a simple theme configuration file
33
+
34
+ <Tip>
35
+ Unmint is designed to be forked and customized. All the code is yours to modify.
36
+ </Tip>
37
+
38
+ ## Why Unmint?
39
+
40
+ | Feature | Unmint | Typical SaaS |
41
+ |---------|--------|--------------|
42
+ | Cost | Free | $50-500/mo |
43
+ | Customization | Full control | Limited |
44
+ | Data ownership | 100% yours | Hosted |
45
+ | Self-hosted | Yes | No |
46
+ | Open source | Yes | No |
47
+
48
+ ## Getting Started
49
+
50
+ ```bash
51
+ # Clone the repository
52
+ git clone https://github.com/your-org/unmint.git my-docs
53
+
54
+ # Install dependencies
55
+ cd my-docs
56
+ npm install
57
+
58
+ # Start development server
59
+ npm run dev
60
+ ```
61
+
62
+ Then open [http://localhost:3000](http://localhost:3000) to see your docs.
63
+
64
+ ## Built With
65
+
66
+ Unmint is built on top of excellent open-source projects:
67
+
68
+ <CardGroup cols={2}>
69
+ <Card title="Fumadocs" href="https://fumadocs.vercel.app">
70
+ The documentation framework powering search, MDX processing, and content management.
71
+ </Card>
72
+ <Card title="Next.js" href="https://nextjs.org">
73
+ The React framework for production-grade web applications.
74
+ </Card>
75
+ <Card title="Tailwind CSS" href="https://tailwindcss.com">
76
+ A utility-first CSS framework for rapid UI development.
77
+ </Card>
78
+ <Card title="Shiki" href="https://shiki.style">
79
+ Beautiful syntax highlighting powered by the same engine as VS Code.
80
+ </Card>
81
+ <Card title="next-themes" href="https://github.com/pacocoursey/next-themes">
82
+ Perfect dark mode with zero flash and system preference detection.
83
+ </Card>
84
+ <Card title="React" href="https://react.dev">
85
+ The library for building user interfaces.
86
+ </Card>
87
+ </CardGroup>
88
+
89
+ <Note>
90
+ Unmint is fully open source under the MIT license. Feel free to use it for personal or commercial projects.
91
+ </Note>
@@ -0,0 +1,13 @@
1
+ {
2
+ "title": "Documentation",
3
+ "pages": [
4
+ "index",
5
+ "quickstart",
6
+ "---Getting Started---",
7
+ "components",
8
+ "theming",
9
+ "---Guides---",
10
+ "deployment",
11
+ "customization"
12
+ ]
13
+ }
@@ -0,0 +1,110 @@
1
+ ---
2
+ title: Quick Start
3
+ description: Get your documentation site up and running in under 5 minutes
4
+ ---
5
+
6
+ This guide will help you set up Unmint and create your first documentation page.
7
+
8
+ ## Prerequisites
9
+
10
+ Before you begin, make sure you have:
11
+
12
+ - **Node.js 18+** installed
13
+ - **npm** or **pnpm** package manager
14
+ - A code editor (VS Code recommended)
15
+
16
+ ## Installation
17
+
18
+ <Steps>
19
+ <Step title="Clone the repository">
20
+ Start by cloning the Unmint template:
21
+
22
+ ```bash
23
+ git clone https://github.com/your-org/unmint.git my-docs
24
+ cd my-docs
25
+ ```
26
+ </Step>
27
+
28
+ <Step title="Install dependencies">
29
+ Install the required npm packages:
30
+
31
+ ```bash
32
+ npm install
33
+ ```
34
+ </Step>
35
+
36
+ <Step title="Start the development server">
37
+ Launch the local development server:
38
+
39
+ ```bash
40
+ npm run dev
41
+ ```
42
+
43
+ Open [http://localhost:3000](http://localhost:3000) in your browser.
44
+ </Step>
45
+
46
+ <Step title="Create your first page">
47
+ Add a new MDX file in `content/docs/`:
48
+
49
+ ```mdx
50
+ ---
51
+ title: My First Page
52
+ description: A description of my page
53
+ ---
54
+
55
+ # Hello World
56
+
57
+ This is my first documentation page!
58
+ ```
59
+ </Step>
60
+ </Steps>
61
+
62
+ ## Project Structure
63
+
64
+ Here's an overview of the key directories:
65
+
66
+ ```
67
+ my-docs/
68
+ ├── app/ # Next.js app directory
69
+ │ ├── docs/ # Documentation routes
70
+ │ └── components/ # UI components
71
+ ├── content/
72
+ │ └── docs/ # Your MDX documentation files
73
+ │ ├── index.mdx # Homepage
74
+ │ └── meta.json # Navigation structure
75
+ ├── lib/
76
+ │ └── theme-config.ts # Customize your theme here
77
+ └── public/ # Static assets
78
+ ```
79
+
80
+ ## Adding Navigation
81
+
82
+ Edit `content/docs/meta.json` to configure your sidebar navigation:
83
+
84
+ ```json
85
+ {
86
+ "title": "Documentation",
87
+ "pages": [
88
+ "index",
89
+ "quickstart",
90
+ "---Getting Started---",
91
+ "installation",
92
+ "configuration"
93
+ ]
94
+ }
95
+ ```
96
+
97
+ <Info>
98
+ Use `"---Section Name---"` to create section separators in your sidebar.
99
+ </Info>
100
+
101
+ ## Next Steps
102
+
103
+ <CardGroup cols={2}>
104
+ <Card title="Learn Components" icon="code" href="/docs/components">
105
+ Explore all available MDX components
106
+ </Card>
107
+ <Card title="Customize Theme" icon="gear" href="/docs/theming">
108
+ Match your brand colors and styling
109
+ </Card>
110
+ </CardGroup>
@@ -0,0 +1,41 @@
1
+ ---
2
+ title: Theming
3
+ description: Customize colors, fonts, and branding
4
+ ---
5
+
6
+ All theming options are centralized in `lib/theme-config.ts`.
7
+
8
+ ## Site Configuration
9
+
10
+ ```typescript
11
+ export const siteConfig = {
12
+ name: 'My Docs',
13
+ description: 'Documentation for My Project',
14
+ url: 'https://docs.example.com',
15
+ logo: { src: '/logo.png', alt: 'My Project', width: 32, height: 32 },
16
+ links: {
17
+ github: 'https://github.com/your-org/your-repo',
18
+ },
19
+ }
20
+ ```
21
+
22
+ ## Accent Colors
23
+
24
+ Customize your accent color:
25
+
26
+ ```typescript
27
+ export const themeConfig = {
28
+ colors: {
29
+ light: { accent: '#0891b2' },
30
+ dark: { accent: '#22d3ee' },
31
+ },
32
+ }
33
+ ```
34
+
35
+ <Tip>
36
+ Use a brighter shade of your accent color for dark mode.
37
+ </Tip>
38
+
39
+ ## CSS Variables
40
+
41
+ Available variables: `--accent`, `--accent-foreground`, `--accent-muted`.
@@ -0,0 +1,7 @@
1
+ import { docs } from '../.source/server'
2
+ import { loader } from 'fumadocs-core/source'
3
+
4
+ export const source = loader({
5
+ baseUrl: '/docs',
6
+ source: docs.toFumadocsSource(),
7
+ })
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Unmint Theme Configuration
3
+ *
4
+ * Customize your documentation's look and feel by modifying this file.
5
+ * All colors, branding, and styling can be adjusted here.
6
+ */
7
+
8
+ export const siteConfig = {
9
+ // Site metadata
10
+ name: 'Unmint',
11
+ description: 'A free, open-source Mintlify-style documentation system',
12
+ url: 'https://docs.example.com',
13
+
14
+ // Logo configuration
15
+ logo: {
16
+ src: '/logo.png',
17
+ alt: 'Unmint',
18
+ width: 40,
19
+ height: 40,
20
+ },
21
+
22
+ // Navigation links
23
+ links: {
24
+ github: 'https://github.com/your-org/your-repo',
25
+ discord: 'https://discord.gg/your-invite',
26
+ twitter: 'https://twitter.com/yourhandle',
27
+ support: 'mailto:support@example.com',
28
+ },
29
+
30
+ // Footer configuration
31
+ footer: {
32
+ copyright: '© 2025 Your Company. All rights reserved.',
33
+ links: [
34
+ { label: 'Website', href: 'https://example.com' },
35
+ { label: 'GitHub', href: 'https://github.com/your-org' },
36
+ ],
37
+ },
38
+ }
39
+
40
+ export const themeConfig = {
41
+ // Primary accent color - used for active states, links, highlights
42
+ colors: {
43
+ // Light mode
44
+ light: {
45
+ accent: '#0891b2', // Primary accent color
46
+ accentForeground: '#ffffff',
47
+ accentMuted: 'rgba(8, 145, 178, 0.1)',
48
+ },
49
+ // Dark mode
50
+ dark: {
51
+ accent: '#22d3ee', // Brighter for dark backgrounds
52
+ accentForeground: '#0f172a',
53
+ accentMuted: 'rgba(34, 211, 238, 0.1)',
54
+ },
55
+ },
56
+
57
+ // Code block styling
58
+ codeBlock: {
59
+ light: {
60
+ background: '#fafafa',
61
+ titleBar: '#f3f4f6',
62
+ },
63
+ dark: {
64
+ background: '#1a1a1f',
65
+ titleBar: '#1f2937',
66
+ },
67
+ },
68
+
69
+ // OG Image generation settings
70
+ ogImage: {
71
+ // Gradient background (CSS gradient string)
72
+ gradient: 'linear-gradient(135deg, #ffffff 0%, #e0f7fa 50%, #67e8f9 100%)',
73
+ // Text colors
74
+ titleColor: '#0f172a',
75
+ sectionColor: '#0891b2',
76
+ // Logo URL (absolute URL required for OG images)
77
+ logoUrl: 'https://example.com/logo.png',
78
+ },
79
+ }
80
+
81
+ // Export CSS variable values for use in Tailwind
82
+ export function getCSSVariables(mode: 'light' | 'dark') {
83
+ const colors = themeConfig.colors[mode]
84
+ return {
85
+ '--accent': colors.accent,
86
+ '--accent-foreground': colors.accentForeground,
87
+ '--accent-muted': colors.accentMuted,
88
+ }
89
+ }
@@ -0,0 +1,6 @@
1
+ import { clsx, type ClassValue } from 'clsx'
2
+ import { twMerge } from 'tailwind-merge'
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }
@@ -0,0 +1,10 @@
1
+ import { createMDX } from 'fumadocs-mdx/next'
2
+
3
+ /** @type {import('next').NextConfig} */
4
+ const nextConfig = {
5
+ reactStrictMode: true,
6
+ }
7
+
8
+ const withMDX = createMDX()
9
+
10
+ export default withMDX(nextConfig)