-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05ce6f5
commit 42e5fdf
Showing
45 changed files
with
928 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_label: 'Introduction' | ||
displayed_sidebar: webtoolsSidebar | ||
slug: /webtools/addons | ||
--- | ||
|
||
# Webtools addons | ||
|
||
Webtools is all about tools to enhance your website management workflow in Strapi. At it's core, it will keep a register of all the URLs on your website, using those to uniquely identify the different pages. This is a functionality that can easily be built upon by other plugins who also expect Strapi to have a register of URLs. Think of a sitemap, a menu, dynamic links, redirects etc. | ||
|
||
To enhance Webtools in a modular way, the core plugin allows addons to be registered to build upon it's functionalities. Addons are in Strapi terms just standalone plugins, but have `@pluginpal/webtools-core` as a peer dependency. You will have to install each addon as you would normally install a plugin in to Strapi. | ||
|
||
<CustomDocCardsWrapper> | ||
<CustomDocCard emoji="🔀" title="Sitemap" description="The Sitemap addon can be used to generate a customizable sitemap using all your Webtools URL aliases" link="/webtools/addons/sitemap" /> | ||
</CustomDocCardsWrapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_label: 'Rest API' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/api | ||
--- | ||
|
||
# Rest API |
17 changes: 17 additions & 0 deletions
17
docs/webtools/addons/sitemap/configuration/auto-generate.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
sidebar_label: 'Auto generate' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/configuration/auto-generate | ||
--- | ||
|
||
# Auto generate | ||
|
||
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. | ||
|
||
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. | ||
|
||
Also the search engines don't even crawl your sitemap that often, so generating it once a day through cron should be suffecient. | ||
|
||
###### Key: `autoGenerate ` | ||
|
||
> `required:` NO | `type:` bool | `default:` false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_label: 'Cron' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/configuration/cron | ||
--- | ||
|
||
# CRON | ||
|
||
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. | ||
|
||
If you want to change the cron interval you can alter the `cron` setting. | ||
|
||
###### Key: `cron ` | ||
|
||
> `required:` NO | `type:` bool | `default:` 0 0 0 * * * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_label: 'Introduction' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/configuration | ||
--- | ||
|
||
# Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_label: 'Limit' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/configuration/limit | ||
--- | ||
|
||
# Limit | ||
|
||
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. | ||
|
||
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. | ||
|
||
###### Key: `limit ` | ||
|
||
> `required:` NO | `type:` int | `default:` 45000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
sidebar_label: 'XSL' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/xsl | ||
--- | ||
|
||
# XSL | ||
|
||
This plugin ships with some XSL files to make your sitemaps human readable. It adds some styling and does some reordering of the links. | ||
|
||
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. | ||
|
||
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. | ||
|
||
###### Key: `xsl ` | ||
|
||
> `required:` NO | `type:` bool | `default:` true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
sidebar_label: 'CLI' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/cli | ||
--- | ||
|
||
# 📺 CLI | ||
|
||
This plugin comes with it's own `strapi-sitemap` CLI. | ||
You can add it to your project like so: | ||
|
||
``` | ||
"scripts": { | ||
// ... | ||
"sitemap": "strapi-sitemap" | ||
}, | ||
``` | ||
|
||
You can now run the `generate` command like so: | ||
|
||
<Tabs groupId="yarn-npm"> | ||
<TabItem value="yarn" label="Yarn"> | ||
``` | ||
yarn sitemap generate | ||
``` | ||
</TabItem> | ||
<TabItem value="npm" label="NPM"> | ||
``` | ||
npm run sitemap generate | ||
``` | ||
</TabItem> | ||
</Tabs> |
52 changes: 52 additions & 0 deletions
52
docs/webtools/addons/sitemap/getting-started/installation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
sidebar_label: 'Installation' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/installation | ||
--- | ||
|
||
# ⏳ Installation | ||
|
||
:::prerequisites | ||
Complete installation requirements are the exact same as for Strapi itself and can be found in the Strapi documentation. | ||
|
||
**Supported Strapi versions:** | ||
|
||
Strapi v5 use `@pluginpal/webtools-addon-sitemap@^1` | ||
|
||
Strapi v4 use `@pluginpal/webtools-addon-sitemap@^1.0.0-beta` | ||
|
||
::: | ||
|
||
Install the plugin in your Strapi project. | ||
|
||
<Tabs groupId="yarn-npm"> | ||
<TabItem value="yarn" label="Yarn"> | ||
``` | ||
yarn add @pluginpal/webtools-addon-sitemap | ||
``` | ||
</TabItem> | ||
<TabItem value="npm" label="NPM"> | ||
``` | ||
npm install @pluginpal/webtools-addon-sitemap --save | ||
``` | ||
</TabItem> | ||
</Tabs> | ||
|
||
After successful installation you have to rebuild the admin UI so it'll include this plugin. To rebuild and restart Strapi run: | ||
|
||
<Tabs groupId="yarn-npm"> | ||
<TabItem value="yarn" label="Yarn"> | ||
``` | ||
yarn build | ||
yarn develop | ||
``` | ||
</TabItem> | ||
<TabItem value="npm" label="NPM"> | ||
``` | ||
npm run build | ||
npm run develop | ||
``` | ||
</TabItem> | ||
</Tabs> | ||
|
||
Enjoy 🎉 |
23 changes: 23 additions & 0 deletions
23
docs/webtools/addons/sitemap/getting-started/introduction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
sidebar_label: 'Introduction' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap | ||
--- | ||
|
||
# Webtools Sitemap addon | ||
|
||
:::info | ||
This Webtools addon was originally a standalone plugin published to NPM as `strapi-plugin-sitemap`. To read the old docs, please refer to the standalone plugin [github repo](https://github.com/pluginpal/strapi-plugin-sitemap). | ||
::: | ||
|
||
## ✨ Features | ||
|
||
- **Multilingual** (Implements `rel="alternate"` with `@strapi/plugin-i18n`) | ||
- **URL bundles** (Bundle URLs by type and add them to the sitemap XML) | ||
- **Virtual sitemap** (Sitemaps served from the database) | ||
- **Cron regeneration** (Automatically scheduled cron job for regeneration) | ||
- **Sitemap indexes** (Paginated sitemap indexes for large URL sets) | ||
- **Exclude URLs** (Exclude specified URLs from the sitemap) | ||
- **Custom URLs** (URLs of pages which are not managed in Strapi) | ||
- **CLI** (CLI for sitemap generation) | ||
- **Styled with XSL** (Human readable XML styling) |
15 changes: 15 additions & 0 deletions
15
docs/webtools/addons/sitemap/getting-started/multilingual.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_label: 'Multilingual' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/multilingual | ||
--- | ||
|
||
# 🌍 Multilingual | ||
|
||
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. | ||
|
||
For each localization of a page the `<url>` in the sitemap XML will get an extra attribute: | ||
|
||
- `<xhtml:link rel="alternate">` | ||
|
||
This implementation is based on [Google's guidelines](https://developers.google.com/search/docs/advanced/crawling/localized-versions) on localized sitemaps. |
15 changes: 15 additions & 0 deletions
15
docs/webtools/addons/sitemap/getting-started/robots-txt.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_label: 'Robots.txt' | ||
displayed_sidebar: webtoolsSitemapSidebar | ||
slug: /webtools/addons/sitemap/robots-txt | ||
--- | ||
|
||
# 🤖 Robots.txt | ||
|
||
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: | ||
|
||
``` | ||
Sitemap: https://your-strapi-domain.com/api/sitemap/index.xml | ||
``` | ||
|
||
Read more about the `robots.txt` file [here](https://developers.google.com/search/docs/advanced/robots/create-robots-txt). |
Oops, something went wrong.