Skip to content

Commit 9152602

Browse files
authored
Merge pull request #197 from pluginpal/feature/update-readmes
docs: update readmes
2 parents 2a0a660 + fc5e8dd commit 9152602

File tree

4 files changed

+95
-295
lines changed

4 files changed

+95
-295
lines changed

.changeset/strange-jars-tap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@pluginpal/webtools-addon-sitemap": patch
3+
"@pluginpal/webtools-core": patch
4+
---
5+
6+
Update the README files to reference the docs website

README.md

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,80 @@
11
<div align="center">
2-
<h1>Strapi Webtools Monorepo</h1>
2+
<h1>Strapi Webtools</h1>
33

44
<p style="margin-top: 0;">Everything you need to build a website with Strapi CMS</p>
5+
6+
<a href="https://docs.pluginpal.io/webtools">Read the documentation</a>
7+
8+
<p>
9+
<a href="https://www.npmjs.org/package/@pluginpal/webtools-core">
10+
<img src="https://img.shields.io/npm/v/@pluginpal/webtools-core/latest.svg" alt="NPM Version" />
11+
</a>
12+
<a href="https://www.npmjs.org/package/@pluginpal/webtools-core">
13+
<img src="https://img.shields.io/npm/dm/@pluginpal/webtools-core" alt="Monthly download on NPM" />
14+
</a>
15+
<a href="https://codecov.io/gh/pluginpal/strapi-webtools">
16+
<img src="https://img.shields.io/github/actions/workflow/status/pluginpal/strapi-webtools/tests.yml?branch=master" alt="CI build status" />
17+
</a>
18+
<a href="https://codecov.io/gh/pluginpal/strapi-webtools">
19+
<img src="https://codecov.io/gh/pluginpal/strapi-webtools/coverage.svg?branch=master" alt="codecov.io" />
20+
</a>
21+
</p>
522

623
</div>
724

8-
## The Webtools suite is still in BETA
25+
> [!IMPORTANT]
26+
> The Webtools suite is still in BETA
27+
28+
## ✨ Features
29+
30+
- **Unique URLs** Every page will get their own unique path
31+
- **Auto generated** Automatically generated based on a pattern
32+
- **Flexible** Overwrite single URLs
33+
- **Frontend router** Get any page by it's unique path from the public API
34+
- **Auto slugify** The URLs will automatically be slugified to ensure valid paths
35+
36+
## ⏳ Installation
37+
38+
[Read the Getting Started tutorial](https://docs.pluginpal.io/webtools) or follow the steps below:
39+
40+
```bash
41+
# using yarn
42+
yarn add @pluginpal/webtools-core
43+
44+
# using npm
45+
npm install @pluginpal/webtools-core --save
46+
```
47+
48+
After successful installation you have to rebuild the admin UI so it'll include this plugin. To rebuild and restart Strapi run:
49+
50+
```bash
51+
# using yarn
52+
yarn build
53+
yarn develop
954

10-
## Packages
55+
# using npm
56+
npm run build
57+
npm run develop
58+
```
1159

12-
This repository contains several plugins:
60+
Enjoy 🎉
1361

14-
1. [The Core Plugin](https://github.com/pluginpal/strapi-webtools/tree/master/packages/core)
15-
2. [The Sitemap Addon](https://github.com/pluginpal/strapi-webtools/tree/master/packages/addons/sitemap)
62+
## 📓 Documentation
1663

17-
_By clicking on the links above you'll be redirected to the documentation of each plugin_
64+
See our dedicated [repository](https://github.com/pluginpal/docs) for all of PluginPal's documentation, or view the Webtools documentation live:
1865

19-
## ✨ #StrapiPluginWeek
66+
- [Webtools documentation](https://docs.pluginpal.io/webtools)
2067

21-
This plugin was initially made as an entry to the <a href="https://lu.ma/strapihacks">Strapi Plugin Week</a> hackathon. Back then it went under the name "URL alias". Since then a lot has changed and the plugin has been renamed to Webtools where the URL alias feature is just a part of it.
68+
## 🔌 Addons
2269

23-
See the <a href="https://www.loom.com/share/5409b9415e3e4b66ad27eab967c393d0">demo video</a>.
70+
Webtools can be extended by installing addons that hook into the core Webtools functionality. Read more about how addons work and how to install them in the [addons documentation](https://docs.pluginpal.io/webtools/addons).
2471

2572
## 🔗 Links
2673

74+
- [PluginPal marketplace](https://www.pluginpal.io/plugin/webtools)
75+
- [NPM package](https://www.npmjs.com/package/@pluginpal/webtools-core)
2776
- [GitHub repository](https://github.com/pluginpal/strapi-webtools)
77+
- [Strapi marketplace](https://market.strapi.io/plugins/@pluginpal-webtools-core)
2878

2979
## 🌎 Community support
3080

@@ -33,4 +83,4 @@ See the <a href="https://www.loom.com/share/5409b9415e3e4b66ad27eab967c393d0">de
3383

3484
## 📝 Resources
3585

36-
- [MIT License](LICENSE.md)
86+
- [MIT License](https://github.com/pluginpal/strapi-webtools/blob/master/LICENSE.md)

packages/addons/sitemap/README.md

Lines changed: 13 additions & 202 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<h1>Webtools Sitemap add-on</h1>
33

44
<p style="margin-top: 0;">Create a highly customizable sitemap XML in Strapi CMS.</p>
5+
6+
<a href="https://docs.pluginpal.io/webtools/addons/sitemap">Read the documentation</a>
57

68
<p>
79
<a href="https://www.npmjs.org/package/@pluginpal/webtools-addon-sitemap">
@@ -10,11 +12,11 @@
1012
<a href="https://www.npmjs.org/package/@pluginpal/webtools-addon-sitemap">
1113
<img src="https://img.shields.io/npm/dm/@pluginpal/webtools-addon-sitemap" alt="Monthly download on NPM" />
1214
</a>
13-
<a href="https://codecov.io/gh/boazpoolman/@pluginpal/webtools-addon-sitemap">
14-
<img src="https://img.shields.io/github/actions/workflow/status/boazpoolman/@pluginpal/webtools-addon-sitemap/tests.yml?branch=master" alt="CI build status" />
15+
<a href="https://codecov.io/gh/pluginpal/strapi-webtools">
16+
<img src="https://img.shields.io/github/actions/workflow/status/pluginpal/strapi-webtools/tests.yml?branch=master" alt="CI build status" />
1517
</a>
16-
<a href="https://codecov.io/gh/boazpoolman/@pluginpal/webtools-addon-sitemap">
17-
<img src="https://codecov.io/gh/boazpoolman/@pluginpal/webtools-addon-sitemap/coverage.svg?branch=master" alt="codecov.io" />
18+
<a href="https://codecov.io/gh/pluginpal/strapi-webtools">
19+
<img src="https://codecov.io/gh/pluginpal/strapi-webtools/coverage.svg?branch=master" alt="codecov.io" />
1820
</a>
1921
</p>
2022
</div>
@@ -33,7 +35,7 @@
3335

3436
## ⏳ Installation
3537

36-
Install the plugin in your Strapi project.
38+
[Read the Getting Started tutorial](https://docs.pluginpal.io/webtools/addons/sitemap) or follow the steps below:
3739

3840
```bash
3941
# using yarn
@@ -59,204 +61,11 @@ The **Sitemap** plugin should now appear in the **Settings** section of your Str
5961

6062
Enjoy 🎉
6163

62-
## 🖐 Requirements
63-
64-
Complete installation requirements are the exact same as for Strapi itself and can be found in the [Strapi documentation](https://strapi.io/documentation).
65-
66-
**Supported Strapi versions**:
67-
68-
- Strapi 4
69-
70-
(This plugin may work with older Strapi versions, but these are not tested nor officially supported.)
71-
72-
**We recommend always using the latest version of Strapi to start your new projects**.
73-
74-
## 💡 Usage
75-
With this plugin you have full control over which URLs you add to your sitemap XML. Go to the admin section of the plugin and start adding URLs. Here you will find that there are two ways to add URLs to the sitemap. With **URL bundles** and **Custom URLs**.
76-
77-
### URL bundles
78-
A URL bundle is a set of URLs grouped by type. If you set up an URL bundle, all pages of that content type will end up in the sitemap.
79-
80-
URLs coming from a URL bundle will get the following XML attributes:
81-
82-
- `<loc>`
83-
- `<lastmod>`
84-
- `<priority>`
85-
- `<changefreq>`
86-
87-
### Custom URLs
88-
A custom URL is meant to add URLs to the sitemap which are not managed in Strapi. It might be that you have custom route like `/account` that is hardcoded in your front-end. If you'd want to add such a route (URL) to the sitemap you can add it as a custom URL.
89-
90-
Custom URLs will get the following XML attributes:
91-
92-
- `<loc>`
93-
- `<priority>`
94-
- `<changefreq>`
95-
96-
## 🌍 Multilingual
97-
98-
When adding a URL bundle of a type which has localizations enabled you will be presented with a language dropdown in the settings form. You can now set a different URL pattern for each language.
99-
100-
For each localization of a page the `<url>` in the sitemap XML will get an extra attribute:
101-
102-
- `<xhtml:link rel="alternate">`
103-
104-
This implementation is based on [Google's guidelines](https://developers.google.com/search/docs/advanced/crawling/localized-versions) on localized sitemaps.
105-
106-
## 🔗 Sitemap index
107-
108-
Large sitemaps (larger then 45.000 urls) will automatically be split up in to seperate sitemaps. <br />
109-
A sitemap index will be created that links to all the different sitemap chunks. <br />
110-
That sitemap index will be accessible on the default `/api/sitemap/index.xml` location.
111-
112-
It is required to set the `url` in the `./config/server.js` file in your Strapi installation.
113-
That will be used to create the links to the different chunks.
114-
115-
You can alter the 45.000 magic number through plugin config.
116-
117-
## 🤖 Robots.txt
118-
119-
To make sure search engines are able to find the sitemap XML create a `robots.txt` file in the front-end of your website and add the following line:
120-
121-
```
122-
Sitemap: https://your-strapi-domain.com/api/sitemap/index.xml
123-
```
124-
125-
Read more about the `robots.txt` file [here](https://developers.google.com/search/docs/advanced/robots/create-robots-txt).
126-
127-
## 📺 CLI
128-
129-
This plugin comes with it's own `strapi-sitemap` CLI.
130-
You can add it to your project like so:
131-
132-
```
133-
"scripts": {
134-
// ...
135-
"sitemap": "strapi-sitemap"
136-
},
137-
```
138-
139-
You can now run the `generate` command like so:
140-
141-
```bash
142-
# using yarn
143-
yarn sitemap generate
144-
145-
# using npm
146-
npm run sitemap generate
147-
```
148-
149-
## ⚙️ Settings
150-
Settings can be changed in the admin section of the plugin. In the last tab (Settings) you will find the settings as described below.
151-
152-
### Hostname (required)
153-
154-
The hostname is the URL of your website. It will be used as the base URL of all URLs added to the sitemap XML. It is required to generate the XML file.
155-
156-
###### Key: `hostname`
157-
158-
> `required:` YES | `type:` string | `default:` ''
159-
160-
### Hostname overrides
161-
162-
If you are using this plugin in a multilingual Strapi project you will be presented with a 'Hostname overrides' setting.
163-
With this setting you can set a specific hostname per language.
164-
165-
This is handy for when you have a URL structure like this:
166-
167-
- https://en.domain.com (english domain)
168-
- https://nl.domain.com (dutch domain)
169-
- https://de.domain.com (german domain)
170-
171-
###### Key: `hostname_overrides`
172-
173-
> `required:` NO | `type:` object | `default:` {}
174-
175-
### Exclude drafts
176-
177-
When using the draft/publish functionality in Strapi this setting will make sure that all draft pages are excluded from the sitemap. If you want to have the draft pages in the sitemap anyways you can disable this setting.
178-
179-
###### Key: `excludeDrafts`
180-
181-
> `required:` NO | `type:` bool | `default:` true
182-
183-
### Include homepage
184-
185-
This setting will add a default `/` entry to the sitemap XML when none is present. The `/` entry corresponds to the homepage of your website.
186-
187-
###### Key: `includeHomepage`
188-
189-
> `required:` NO | `type:` bool | `default:` true
190-
191-
### Default language URL (x-default)
192-
193-
This setting will add an additionnal `<link />` tag into each sitemap urls bundles with value `hreflang="x-default"` and the path of your choice. The hreflang x-default value is used to specify the language and region neutral URL for a piece of content when the site doesn't support the user's language and region. For example, if a page has hreflang annotations for English and Spanish versions of a page along with an x-default value pointing to the English version, French speaking users are sent to the English version of the page due to the x-default annotation. The x-default page can be a language and country selector page, the page where you redirect users when you have no content for their region, or just the version of the content that you consider default.
194-
195-
###### Key: `defaultLanguageUrlType`
196-
197-
> `required:` NO | `type:` string | `default:` ''
198-
199-
## 🔧 Config
200-
Config can be changed in the `config/plugins.js` file in your Strapi project.
201-
You can overwrite the config like so:
202-
203-
```
204-
module.exports = ({ env }) => ({
205-
// ...
206-
'sitemap': {
207-
enabled: true,
208-
config: {
209-
cron: '0 0 0 * * *',
210-
limit: 45000,
211-
xsl: true,
212-
autoGenerate: false,
213-
},
214-
},
215-
});
216-
```
217-
### CRON
218-
219-
To make sure the sitemap stays up-to-date this plugin will automatically schedule a cron job that generates the sitemap for you. That cron job is configured to run once a day at 00:00.
220-
221-
If you want to change the cron interval you can alter the `cron` setting.
222-
223-
###### Key: `cron `
224-
225-
> `required:` NO | `type:` bool | `default:` 0 0 0 * * *
226-
227-
### Limit
228-
229-
When creating large sitemaps (50.000+ URLs) you might want to split the sitemap in to chunks that you bring together in a sitemap index.
230-
231-
The limit is there to specify the maximum amount of URL a single sitemap may hold. If you try to add more URLs to a single sitemap.xml it will automatically be split up in to chunks which are brought together in a single sitemap index.
232-
233-
###### Key: `limit `
234-
235-
> `required:` NO | `type:` int | `default:` 45000
236-
237-
### XSL
238-
239-
This plugin ships with some XSL files to make your sitemaps human readable. It adds some styling and does some reordering of the links.
240-
241-
These changes are by no means a requirement for your sitemap to be valid. It is really just there to make your sitemap look pretty.
242-
243-
If you have a large sitemap you might encounter performance issues when accessing the sitemap.xml from the browser. In that case you can disable the XSL to fix these issues.
244-
245-
###### Key: `xsl `
246-
247-
> `required:` NO | `type:` bool | `default:` true
248-
249-
### Auto generate
250-
251-
Alternatively to using cron to regenerate your sitemap, this plugin offers an automatic generation feature that will generate the sitemap through lifecycle methods. On `create`, `update` and `delete` this plugin will do a full sitemap regeneration. This way your sitemap will always be up-to-date when making content changes.
252-
253-
If you have a large sitemap the regeneration becomes an expensive task. Because of that this setting is disabled by default and it is not recommended to enable it for sitemaps with more than 1000 links.
254-
255-
Also the search engines don't even crawl your sitemap that often, so generating it once a day through cron should be suffecient.
64+
## 📓 Documentation
25665

257-
###### Key: `autoGenerate `
66+
See our dedicated [repository](https://github.com/pluginpal/docs) for all of PluginPal's documentation, or view the Webtools Sitemap add-on documentation live:
25867

259-
> `required:` NO | `type:` bool | `default:` false
68+
- [Webtools Sitemap add-on documentation](https://docs.pluginpal.io/webtools/addons/sitemap)
26069

26170
## 🤝 Contributing
26271

@@ -268,8 +77,10 @@ Give a star if this project helped you.
26877

26978
## 🔗 Links
27079

80+
- [PluginPal marketplace](https://www.pluginpal.io/plugin/webtools)
27181
- [NPM package](https://www.npmjs.com/package/@pluginpal/webtools-addon-sitemap)
27282
- [GitHub repository](https://github.com/pluginpal/strapi-webtools)
83+
- [Strapi marketplace](https://market.strapi.io/plugins/@pluginpal-webtools-core)
27384

27485
## 🌎 Community support
27586

@@ -278,4 +89,4 @@ Give a star if this project helped you.
27889

27990
## 📝 Resources
28091

281-
- [MIT License](LICENSE.md)
92+
- [MIT License](https://github.com/pluginpal/strapi-webtools/blob/master/LICENSE.md)

0 commit comments

Comments
 (0)