Skip to content

Commit 0635d34

Browse files
committed
refactor: enhance README with updated installation instructions, usage examples, and improved options table
1 parent 7a29dcd commit 0635d34

File tree

1 file changed

+60
-63
lines changed

1 file changed

+60
-63
lines changed

README.md

Lines changed: 60 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22

33
Beautiful documentation sites from Markdown. Fast, simple, and open-source.
44

5+
> **Note:** This package was previously published as `@devrohit06/superdocs`. It has been renamed to `@litodocs/cli`.
6+
57
## Features
68

7-
**Simple Setup** - Point to your docs folder and go
8-
🚀 **Astro-Powered** - Leverages Astro's speed and SEO optimization
9-
📝 **Markdown & MDX** - Full support for both formats with frontmatter
10-
🎨 **Customizable Templates** - Use GitHub-hosted or local templates
11-
🔥 **Hot Reload** - Dev server with live file watching
12-
**Fast Builds** - Static site generation for optimal performance
13-
🎯 **SEO Optimized** - Meta tags, semantic HTML, and proper structure
9+
-**Simple Setup** - Point to your docs folder and go
10+
- 🚀 **Astro-Powered** - Leverages Astro's speed and SEO optimization
11+
- 📝 **Markdown & MDX** - Full support for both formats with frontmatter
12+
- 🎨 **Customizable Templates** - Use GitHub-hosted or local templates
13+
- 🔥 **Hot Reload** - Dev server with live file watching
14+
-**Fast Builds** - Static site generation for optimal performance
15+
- 🎯 **SEO Optimized** - Meta tags, semantic HTML, and proper structure
16+
- 🌍 **i18n Support** - Built-in internationalization with 40+ languages
17+
- 📚 **Versioning** - Documentation versioning with version switcher
18+
- 🎨 **Dynamic Theming** - OKLCH color palette generation from primary color
1419

1520
## Installation
1621

@@ -20,14 +25,36 @@ Beautiful documentation sites from Markdown. Fast, simple, and open-source.
2025
npm install -g @litodocs/cli
2126
# or
2227
pnpm add -g @litodocs/cli
28+
# or
29+
yarn global add @litodocs/cli
2330
```
2431

2532
### Local Development
2633

34+
Clone the repository and link it locally:
35+
2736
```bash
28-
cd lito
37+
git clone https://github.com/Lito-docs/cli.git
38+
cd cli
2939
pnpm install
3040
chmod +x bin/cli.js
41+
npm link
42+
```
43+
44+
Now you can use `lito` command globally from your terminal.
45+
46+
## Quick Start
47+
48+
```bash
49+
# Create a docs folder with markdown files
50+
mkdir my-docs
51+
echo "# Hello World" > my-docs/index.md
52+
53+
# Start dev server
54+
lito dev -i ./my-docs
55+
56+
# Build for production
57+
lito build -i ./my-docs -o ./dist
3158
```
3259

3360
## Usage
@@ -42,14 +69,16 @@ lito build --input ./my-docs --output ./dist
4269

4370
**Options:**
4471

45-
- `-i, --input <path>` (required) - Path to your docs folder
46-
- `-o, --output <path>` - Output directory (default: `./dist`)
47-
- `-t, --template <name>` - Template to use (see [Templates](#templates))
48-
- `-b, --base-url <url>` - Base URL for the site (default: `/`)
49-
- `--provider <name>` - optimize for hosting provider (vercel, netlify, cloudflare, static)
50-
- `--rendering <mode>` - Rendering mode (static, server, hybrid)
51-
- `--search` - Enable search functionality
52-
- `--refresh` - Force re-download template from GitHub
72+
| Option | Description | Default |
73+
|--------|-------------|---------|
74+
| `-i, --input <path>` | Path to your docs folder (required) | - |
75+
| `-o, --output <path>` | Output directory | `./dist` |
76+
| `-t, --template <name>` | Template to use | `default` |
77+
| `-b, --base-url <url>` | Base URL for the site | `/` |
78+
| `--provider <name>` | Hosting provider (vercel, netlify, cloudflare, static) | `static` |
79+
| `--rendering <mode>` | Rendering mode (static, server, hybrid) | `static` |
80+
| `--search` | Enable search functionality | `false` |
81+
| `--refresh` | Force re-download template | `false` |
5382

5483
### Dev Command
5584

@@ -61,12 +90,14 @@ lito dev --input ./my-docs
6190

6291
**Options:**
6392

64-
- `-i, --input <path>` (required) - Path to your docs folder
65-
- `-t, --template <name>` - Template to use
66-
- `-b, --base-url <url>` - Base URL for the site
67-
- `-p, --port <number>` - Port for dev server (default: `4321`)
68-
- `--search` - Enable search functionality
69-
- `--refresh` - Force re-download template
93+
| Option | Description | Default |
94+
|--------|-------------|---------|
95+
| `-i, --input <path>` | Path to your docs folder (required) | - |
96+
| `-t, --template <name>` | Template to use | `default` |
97+
| `-b, --base-url <url>` | Base URL for the site | `/` |
98+
| `-p, --port <number>` | Port for dev server | `4321` |
99+
| `--search` | Enable search functionality | `false` |
100+
| `--refresh` | Force re-download template | `false` |
70101

71102
### Eject Command
72103

@@ -81,21 +112,27 @@ lito eject --input ./my-docs --output ./my-project
81112
Lito includes built-in optimizations for major hosting providers. Use the `--provider` flag during build:
82113

83114
### Vercel
115+
84116
```bash
85117
lito build -i ./docs --provider vercel
86118
```
119+
87120
Generates `vercel.json` and optimizes for Vercel's edge network.
88121

89122
### Netlify
123+
90124
```bash
91125
lito build -i ./docs --provider netlify
92126
```
127+
93128
Generates `netlify.toml` with security headers.
94129

95130
### Cloudflare Pages
131+
96132
```bash
97133
lito build -i ./docs --provider cloudflare --rendering server
98134
```
135+
99136
Configures the project for Cloudflare's edge runtime with SSR support.
100137

101138
## Analytics
@@ -198,7 +235,7 @@ Your content here...
198235

199236
## Architecture
200237

201-
The CLI tool:
238+
The CLI tool follows this pipeline:
202239

203240
1. **Resolves Template** - Fetches from GitHub or uses local template
204241
2. **Scaffolds** - Creates a temporary Astro project from the template
@@ -207,46 +244,6 @@ The CLI tool:
207244
5. **Builds/Serves** - Spawns native Astro CLI commands
208245
6. **Watches** (dev mode) - Uses `chokidar` to monitor file changes
209246

210-
## Development
211-
212-
### Project Structure
213-
214-
```
215-
lito/
216-
├── bin/
217-
│ └── cli.js # CLI entry point
218-
├── src/
219-
│ ├── cli.js # Commander setup
220-
│ ├── commands/
221-
│ │ ├── build.js # Build command
222-
│ │ ├── dev.js # Dev command with watcher
223-
│ │ ├── eject.js # Eject command
224-
│ │ └── template.js # Template management
225-
│ ├── core/
226-
│ │ ├── scaffold.js # Project scaffolding
227-
│ │ ├── sync.js # File syncing
228-
│ │ ├── config.js # Config generation
229-
│ │ ├── astro.js # Astro CLI spawning
230-
│ │ ├── template-fetcher.js # GitHub template fetching
231-
│ │ └── template-registry.js # Template name registry
232-
│ └── template/ # Bundled fallback template
233-
└── package.json
234-
```
235-
236-
### Running Tests
237-
238-
```bash
239-
# Create sample docs
240-
mkdir sample-docs
241-
echo "# Hello\n\nWelcome!" > sample-docs/index.md
242-
243-
# Test build
244-
node bin/cli.js build -i sample-docs -o test-output
245-
246-
# Test dev server
247-
node bin/cli.js dev -i sample-docs
248-
```
249-
250247
## Contributing
251248

252249
Contributions are welcome! Please feel free to submit a Pull Request.

0 commit comments

Comments
 (0)