create-contentisland 0.0.1 → 0.0.2
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.
- package/README.md +63 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# create-contentisland
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The Content Island CLI allows you to quickly bootstrap codebase
|
|
6
|
+
solutions and connect them to your Content Island projects.
|
|
7
|
+
|
|
8
|
+
Currently, the following template is available:
|
|
9
|
+
|
|
10
|
+
- **Starlight Template**
|
|
11
|
+
|
|
12
|
+
> Additional templates will be added soon.
|
|
13
|
+
|
|
14
|
+
## Using the Starlight Template
|
|
15
|
+
|
|
16
|
+
### Prerequisites
|
|
17
|
+
|
|
18
|
+
- A [Content Island](https://contentisland.net/) account (free plans are available).
|
|
19
|
+
- A new [Content Island](https://contentisland.net/) project created with the **Starlight
|
|
20
|
+
template**.
|
|
21
|
+
|
|
22
|
+
### Step 1 --- Create a Starlight project
|
|
23
|
+
|
|
24
|
+
Run the following command to create a new [Starlight](https://starlight.astro.build/) project and install
|
|
25
|
+
its dependencies:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm create astro@latest -- --template starlight
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Step 2 --- Connect your Content Island project
|
|
32
|
+
|
|
33
|
+
Once your Starlight project has been created, connect it to your Content
|
|
34
|
+
Island project:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm create contentisland@latest
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
When prompted, provide your **Content Island Project API token**. You
|
|
41
|
+
can copy this token from the **General** tab of your Content Island
|
|
42
|
+
project settings.
|
|
43
|
+
|
|
44
|
+
### Step 3 --- Sync your content
|
|
45
|
+
|
|
46
|
+
The CLI will automatically replace the contents of the `content/docs`
|
|
47
|
+
folder with the content from your Content Island project.
|
|
48
|
+
|
|
49
|
+
You can then run your project locally:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm run dev
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Step 4 --- Update content
|
|
56
|
+
|
|
57
|
+
Manage your content directly in Content Island---add, edit, or delete
|
|
58
|
+
folders and pages. To update your local Starlight project with the
|
|
59
|
+
latest content, run:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm create contentisland@latest update
|
|
63
|
+
```
|
package/dist/index.js
CHANGED
|
@@ -696,7 +696,7 @@ const I = async (e, n) => {
|
|
|
696
696
|
} catch (e) {
|
|
697
697
|
o.newLine(), o.error("Error during Content Island integration:"), o.error(e instanceof Error ? e.message : String(e)), process.exit(1);
|
|
698
698
|
}
|
|
699
|
-
}, _e = "0.0.
|
|
699
|
+
}, _e = "0.0.2", Re = {
|
|
700
700
|
version: _e
|
|
701
701
|
}, $ = ae("create-contentisland");
|
|
702
702
|
$.command("", "Initialize and validate a project").example("npm create contentisland").example("npm create contentisland --token <token>").example("npm create contentisland --token <token> --template starlight").option(
|