Skip to content

Commit 6a2568e

Browse files
committed
docs: add docs about the webtools-cli
1 parent 59c059c commit 6a2568e

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed

.changeset/vast-news-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"docs": patch
3+
---
4+
5+
docs: add the webtools-cli commands to the docs

packages/docs/docs/getting-started/installation.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,17 @@ Complete installation requirements are the exact same as for Strapi itself and c
1616

1717
### Installation
1818

19-
Install the plugin in your Strapi project.
19+
To install the plugin run the following command.
2020

21-
<Tabs groupId="yarn-npm">
22-
<TabItem value="yarn" label="Yarn">
23-
```
24-
yarn add strapi-plugin-webtools
25-
```
26-
</TabItem>
27-
<TabItem value="npm" label="NPM">
28-
```
29-
npm install strapi-plugin-webtools --save
30-
```
31-
</TabItem>
32-
</Tabs>
21+
```
22+
npx webtools-cli install
23+
```
24+
25+
### Enabling
26+
27+
The installer wizard will ask you which content-types you want to enable. Select the content types that you consider to be web-pages in your website front-end. Each content-type you select will get it's own unique URL which can be used on the front-end. Read more about enabling content-types in the [usage documentation](/webtools/usage).
28+
29+
### Building
3330

3431
After successful installation you have to rebuild the admin UI so it'll include this plugin. To rebuild and restart Strapi run:
3532

@@ -48,6 +45,3 @@ After successful installation you have to rebuild the admin UI so it'll include
4845
</TabItem>
4946
</Tabs>
5047

51-
### Enabling
52-
53-
After successful installation you now need to enable Webtools for the content-types of your choice. Read more about how to do that in the [usage documentation](/webtools/usage).

packages/docs/docs/getting-started/usage.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,30 @@ slug: /usage
55
---
66

77
# 💡 Usage
8-
This plugin is specifically designed for usage in Strapi managed websites. Hence the name **web**tools. The plugin offers a variety of functionalities which you'll have to manually enable in the admin interface.
8+
This plugin is specifically designed for usage in Strapi managed websites. Hence the name **web**tools. The plugin offers a variety of functionalities which you'll have to manually enable.
9+
10+
## Enabling Webtools
11+
12+
Once you enable Webtools for a content-type each entry of that type will get it's own unique URL alias. That alias can be used as the slug of your page in the front-end. To enable Webtools, you have a few options.
13+
14+
### Using the Admin Interface
915

1016
See below a screenshot of how to enable webtools for a given collection type.
1117

1218
<img src="/webtools/img/assets/enable-webtools.png" alt="Enable webtools" />
1319

14-
<br />
15-
<br />
20+
### Using the CLI
21+
22+
You can also use the Webtools CLI to enable Webtools for your content types. This is especially useful when you want to enable Webtools for multiple content types at once.
23+
24+
```bash
25+
npx webtools-cli enable
26+
```
27+
28+
### Manually
1629

1730
:::tip
18-
Enabling Webtools will write the following to your schema file. You can also add this change manually to enable Webtools without using the content-type builder.
31+
Enabling Webtools will write the following to your schema file. You can also add this change manually to enable Webtools without using the content-type builder, or the CLI.
1932

2033
```md title="schema.json"
2134
pluginOptions: {

0 commit comments

Comments
 (0)