@@ -7,7 +7,7 @@ The open-source Mintlify alternative. Beautiful documentation sites from Markdow
77✨ ** Simple Setup** - Point to your docs folder and go
88🚀 ** Astro-Powered** - Leverages Astro's speed and SEO optimization
99📝 ** Markdown & MDX** - Full support for both formats with frontmatter
10- 🎨 ** Responsive Design ** - Mobile-friendly, beautiful documentation
10+ 🎨 ** Customizable Templates ** - Use GitHub-hosted or local templates
1111🔥 ** Hot Reload** - Dev server with live file watching
1212⚡ ** Fast Builds** - Static site generation for optimal performance
1313🎯 ** SEO Optimized** - Meta tags, semantic HTML, and proper structure
@@ -44,20 +44,10 @@ superdocs build --input ./my-docs --output ./dist
4444
4545- ` -i, --input <path> ` (required) - Path to your docs folder
4646- ` -o, --output <path> ` - Output directory (default: ` ./dist ` )
47- - ` -t, --theme <name> ` - Theme to use (` default ` , ` dark ` )
47+ - ` -t, --template <name> ` - Template to use (see [ Templates ] ( #templates ) )
4848- ` -b, --base-url <url> ` - Base URL for the site (default: ` / ` )
4949- ` --search ` - Enable search functionality
50-
51- ** Example:**
52-
53- ``` bash
54- superdocs build \
55- --input ./docs \
56- --output ./public \
57- --theme dark \
58- --base-url /docs/ \
59- --search
60- ```
50+ - ` --refresh ` - Force re-download template from GitHub
6151
6252### Dev Command
6353
@@ -70,32 +60,70 @@ superdocs dev --input ./my-docs
7060** Options:**
7161
7262- ` -i, --input <path> ` (required) - Path to your docs folder
73- - ` -t, --theme <name> ` - Theme to use
63+ - ` -t, --template <name> ` - Template to use
7464- ` -b, --base-url <url> ` - Base URL for the site
7565- ` -p, --port <number> ` - Port for dev server (default: ` 4321 ` )
7666- ` --search ` - Enable search functionality
67+ - ` --refresh ` - Force re-download template
7768
78- ** Example:**
69+ ### Eject Command
70+
71+ Export the full Astro project source code to customize it further:
7972
8073``` bash
81- superdocs dev --input ./docs --port 3000
74+ superdocs eject --input ./my- docs --output ./my-project
8275```
8376
84- ### Eject Command
77+ ## Templates
8578
86- Export the full Astro project source code to customize it further:
79+ SuperDocs supports flexible template sources:
80+
81+ ### Default Template
8782
8883``` bash
89- superdocs eject --input ./my- docs --output ./my-project
84+ superdocs dev -i ./docs
9085```
9186
92- ** Options: **
87+ ### GitHub Templates
9388
94- - ` -i, --input <path> ` (required) - Path to your docs folder
95- - ` -o, --output <path> ` - Output directory for the project (default: ` ./astro-docs-project ` )
96- - ` -t, --theme <name> ` - Theme to use
97- - ` -b, --base-url <url> ` - Base URL for the site
98- - ` --search ` - Enable search functionality
89+ Use templates hosted on GitHub:
90+
91+ ``` bash
92+ # From a GitHub repo
93+ superdocs dev -i ./docs --template github:owner/repo
94+
95+ # Specific branch or tag
96+ superdocs dev -i ./docs --template github:owner/repo#v1.0.0
97+
98+ # Template in a subdirectory
99+ superdocs dev -i ./docs --template github:owner/repo/templates/modern
100+ ```
101+
102+ ### Local Templates
103+
104+ Use a local template folder:
105+
106+ ``` bash
107+ superdocs dev -i ./docs --template ./my-custom-template
108+ ```
109+
110+ ### Template Management
111+
112+ ``` bash
113+ # List available templates
114+ superdocs template list
115+
116+ # Clear template cache
117+ superdocs template cache --clear
118+ ```
119+
120+ ### Update Templates
121+
122+ Templates are cached for 24 hours. Force update with:
123+
124+ ``` bash
125+ superdocs dev -i ./docs --refresh
126+ ```
99127
100128## Documentation Structure
101129
@@ -131,11 +159,12 @@ Your content here...
131159
132160The CLI tool:
133161
134- 1 . ** Scaffolds** - Creates a temporary Astro project from an internal template
135- 2 . ** Syncs** - Copies your docs into ` src/pages/ ` for automatic routing
136- 3 . ** Configures** - Generates dynamic ` astro.config.mjs ` with your options
137- 4 . ** Builds/Serves** - Spawns native Astro CLI commands (` astro build ` or ` astro dev ` )
138- 5 . ** Watches** (dev mode) - Uses ` chokidar ` to monitor file changes
162+ 1 . ** Resolves Template** - Fetches from GitHub or uses local template
163+ 2 . ** Scaffolds** - Creates a temporary Astro project from the template
164+ 3 . ** Syncs** - Copies your docs into ` src/pages/ ` for automatic routing
165+ 4 . ** Configures** - Generates dynamic ` astro.config.mjs ` with your options
166+ 5 . ** Builds/Serves** - Spawns native Astro CLI commands
167+ 6 . ** Watches** (dev mode) - Uses ` chokidar ` to monitor file changes
139168
140169## Development
141170
@@ -150,18 +179,16 @@ superdocs/
150179│ ├── commands/
151180│ │ ├── build.js # Build command
152181│ │ ├── dev.js # Dev command with watcher
153- │ │ └── eject.js # Eject command
182+ │ │ ├── eject.js # Eject command
183+ │ │ └── template.js # Template management
154184│ ├── core/
155185│ │ ├── scaffold.js # Project scaffolding
156186│ │ ├── sync.js # File syncing
157187│ │ ├── config.js # Config generation
158188│ │ ├── astro.js # Astro CLI spawning
159- │ │ └── output.js # Output copying
160- │ └── template/ # Internal Astro template
161- │ ├── src/
162- │ │ ├── layouts/
163- │ │ └── pages/
164- │ └── package.json
189+ │ │ ├── template-fetcher.js # GitHub template fetching
190+ │ │ └── template-registry.js # Template name registry
191+ │ └── template/ # Bundled fallback template
165192└── package.json
166193```
167194
0 commit comments