@litodocs/cli 0.5.0 → 0.5.1

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 (3) hide show
  1. package/README.md +60 -63
  2. package/package.json +1 -1
  3. package/src/cli.js +1 -1
package/README.md CHANGED
@@ -2,15 +2,20 @@
2
2
 
3
3
  Beautiful documentation sites from Markdown. Fast, simple, and open-source.
4
4
 
5
+ > **Note:** This package was previously published as `@devrohit06/superdocs`. It has been renamed to `@litodocs/cli`.
6
+
5
7
  ## Features
6
8
 
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
14
19
 
15
20
  ## Installation
16
21
 
@@ -20,14 +25,36 @@ Beautiful documentation sites from Markdown. Fast, simple, and open-source.
20
25
  npm install -g @litodocs/cli
21
26
  # or
22
27
  pnpm add -g @litodocs/cli
28
+ # or
29
+ yarn global add @litodocs/cli
23
30
  ```
24
31
 
25
32
  ### Local Development
26
33
 
34
+ Clone the repository and link it locally:
35
+
27
36
  ```bash
28
- cd lito
37
+ git clone https://github.com/Lito-docs/cli.git
38
+ cd cli
29
39
  pnpm install
30
40
  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
31
58
  ```
32
59
 
33
60
  ## Usage
@@ -42,14 +69,16 @@ lito build --input ./my-docs --output ./dist
42
69
 
43
70
  **Options:**
44
71
 
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` |
53
82
 
54
83
  ### Dev Command
55
84
 
@@ -61,12 +90,14 @@ lito dev --input ./my-docs
61
90
 
62
91
  **Options:**
63
92
 
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` |
70
101
 
71
102
  ### Eject Command
72
103
 
@@ -81,21 +112,27 @@ lito eject --input ./my-docs --output ./my-project
81
112
  Lito includes built-in optimizations for major hosting providers. Use the `--provider` flag during build:
82
113
 
83
114
  ### Vercel
115
+
84
116
  ```bash
85
117
  lito build -i ./docs --provider vercel
86
118
  ```
119
+
87
120
  Generates `vercel.json` and optimizes for Vercel's edge network.
88
121
 
89
122
  ### Netlify
123
+
90
124
  ```bash
91
125
  lito build -i ./docs --provider netlify
92
126
  ```
127
+
93
128
  Generates `netlify.toml` with security headers.
94
129
 
95
130
  ### Cloudflare Pages
131
+
96
132
  ```bash
97
133
  lito build -i ./docs --provider cloudflare --rendering server
98
134
  ```
135
+
99
136
  Configures the project for Cloudflare's edge runtime with SSR support.
100
137
 
101
138
  ## Analytics
@@ -198,7 +235,7 @@ Your content here...
198
235
 
199
236
  ## Architecture
200
237
 
201
- The CLI tool:
238
+ The CLI tool follows this pipeline:
202
239
 
203
240
  1. **Resolves Template** - Fetches from GitHub or uses local template
204
241
  2. **Scaffolds** - Creates a temporary Astro project from the template
@@ -207,46 +244,6 @@ The CLI tool:
207
244
  5. **Builds/Serves** - Spawns native Astro CLI commands
208
245
  6. **Watches** (dev mode) - Uses `chokidar` to monitor file changes
209
246
 
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
-
250
247
  ## Contributing
251
248
 
252
249
  Contributions are welcome! Please feel free to submit a Pull Request.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@litodocs/cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Beautiful documentation sites from Markdown. Fast, simple, and open-source.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/cli.js CHANGED
@@ -16,7 +16,7 @@ export async function cli() {
16
16
  .description(
17
17
  "Beautiful documentation sites from Markdown. Fast, simple, and open-source."
18
18
  )
19
- .version("0.5.0");
19
+ .version("0.5.1");
20
20
 
21
21
  program
22
22
  .command("build")