diff --git a/.changeset/lemon-ghosts-shout.md b/.changeset/lemon-ghosts-shout.md new file mode 100644 index 00000000..2e9086b8 --- /dev/null +++ b/.changeset/lemon-ghosts-shout.md @@ -0,0 +1,5 @@ +--- +"docs": minor +--- + +docs: enhance the documentation website (fill in blank pages, add images and overall fixes) diff --git a/.changeset/metal-jars-tan.md b/.changeset/metal-jars-tan.md new file mode 100644 index 00000000..567eefb3 --- /dev/null +++ b/.changeset/metal-jars-tan.md @@ -0,0 +1,6 @@ +--- +"webtools-addon-sitemap": patch +"strapi-plugin-webtools": patch +--- + +docs: update the README and package.json with the latest information diff --git a/README.md b/README.md index 08797428..4b49089f 100644 --- a/README.md +++ b/README.md @@ -56,11 +56,17 @@ npm run develop Enjoy 🎉 +## Enabling + +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](https://docs.pluginpal.io/webtools/usage). + ## 📓 Documentation -See our dedicated [repository](https://github.com/pluginpal/docs) for all of PluginPal's documentation, or view the Webtools documentation live: +The full documentation of this plugin can be found on it's dedicated documentation website. + +- [Webtools core plugin](https://docs.pluginpal.io/webtools) +- [Webtools sitemap addon](https://docs.pluginpal.io/webtools/addons/sitemap) -- [Webtools documentation](https://docs.pluginpal.io/webtools) ## 🔌 Addons diff --git a/packages/addons/sitemap/README.md b/packages/addons/sitemap/README.md index 9009833f..e169ae2b 100644 --- a/packages/addons/sitemap/README.md +++ b/packages/addons/sitemap/README.md @@ -23,13 +23,14 @@ ## ✨ Features -- **Multilingual** (Implements `rel="alternate"` with `@strapi/plugin-i18n`) +- **Multilingual** (Implements `rel="alternate"` using the [official i18n Strapi patterns](https://docs.strapi.io/dev-docs/i18n)) +- **Admin UI** (Easily configure your sitemaps using the admin UI) - **URL bundles** (Bundle URLs by type and add them to the sitemap XML) +- **Custom URLs** (URLs of pages which are not managed in Strapi) - **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) @@ -57,15 +58,19 @@ npm run build npm run develop ``` -The **Sitemap** plugin should now appear in the **Settings** section of your Strapi app. +The **Sitemap** plugin should now appear in the **Webtools** section of your Strapi app. Enjoy 🎉 ## 📓 Documentation -See our dedicated [repository](https://github.com/pluginpal/docs) for all of PluginPal's documentation, or view the Webtools Sitemap add-on documentation live: +The full documentation of this plugin can be found on it's dedicated documentation website. + +- [Webtools documentation](https://docs.pluginpal.io/webtools) + +## 🔌 Addons -- [Webtools Sitemap add-on documentation](https://docs.pluginpal.io/webtools/addons/sitemap) +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). ## 🤝 Contributing diff --git a/packages/addons/sitemap/package.json b/packages/addons/sitemap/package.json index 4b865c1c..d0d12b44 100644 --- a/packages/addons/sitemap/package.json +++ b/packages/addons/sitemap/package.json @@ -96,6 +96,10 @@ "url": "https://github.com/pluginpal/strapi-webtools/issues" }, "homepage": "https://github.com/pluginpal/strapi-webtools", + "repository": { + "type": "git", + "url": "git://github.com/pluginpal/strapi-webtools.git" + }, "engines": { "node": ">=18.x.x <=20.x.x", "npm": ">=6.0.0" diff --git a/packages/core/README.md b/packages/core/README.md index 08797428..2615d859 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -56,9 +56,13 @@ npm run develop Enjoy 🎉 +## Enabling + +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](https://docs.pluginpal.io/webtools/usage). + ## 📓 Documentation -See our dedicated [repository](https://github.com/pluginpal/docs) for all of PluginPal's documentation, or view the Webtools documentation live: +The full documentation of this plugin can be found on it's dedicated documentation website. - [Webtools documentation](https://docs.pluginpal.io/webtools) @@ -66,6 +70,14 @@ See our dedicated [repository](https://github.com/pluginpal/docs) for all of Plu 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). +## 🤝 Contributing + +Feel free to fork and make a pull request of this plugin. All the input is welcome! + +## ⭐️ Show your support + +Give a star if this project helped you. + ## 🔗 Links - [PluginPal marketplace](https://www.pluginpal.io/plugin/webtools) diff --git a/packages/core/package.json b/packages/core/package.json index d80d3e59..6fb144bc 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -90,6 +90,10 @@ "url": "https://github.com/pluginpal/strapi-webtools/issues" }, "homepage": "https://www.pluginpal.io/plugin/webtools", + "repository": { + "type": "git", + "url": "git://github.com/pluginpal/strapi-webtools.git" + }, "engines": { "node": ">=18.x.x <=20.x.x", "npm": ">=6.0.0" diff --git a/packages/docs/docs/addons/sitemap/api/rest.md b/packages/docs/docs/addons/sitemap/api/rest.md deleted file mode 100644 index 8e3d244f..00000000 --- a/packages/docs/docs/addons/sitemap/api/rest.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -sidebar_label: 'Rest API' -displayed_sidebar: webtoolsSitemapSidebar -slug: /addons/sitemap/api ---- - -# Rest API diff --git a/packages/docs/docs/addons/sitemap/configuration/introduction.md b/packages/docs/docs/addons/sitemap/configuration/introduction.md index 1cd7e6a2..0db62785 100644 --- a/packages/docs/docs/addons/sitemap/configuration/introduction.md +++ b/packages/docs/docs/addons/sitemap/configuration/introduction.md @@ -4,4 +4,20 @@ displayed_sidebar: webtoolsSitemapSidebar slug: /addons/sitemap/configuration --- -# Configuration +# 🔧 Configuration +The configuration of the plugin can be overridden in the `config/plugins.js` file. +In the example below you can see how, and also what the default settings are. + +```md title="config/plugins.js" +module.exports = ({ env }) => ({ + 'webtools-addon-sitemap': { + enabled: true, + config: { + cron: '0 0 0 * * *', + limit: 45000, + xsl: true, + autoGenerate: false, + }, + }, +}); +``` diff --git a/packages/docs/docs/addons/sitemap/getting-started/installation.md b/packages/docs/docs/addons/sitemap/getting-started/installation.md index 9d280e0b..8d1cd0c6 100644 --- a/packages/docs/docs/addons/sitemap/getting-started/installation.md +++ b/packages/docs/docs/addons/sitemap/getting-started/installation.md @@ -9,13 +9,15 @@ slug: /addons/sitemap/installation :::prerequisites Complete installation requirements are the exact same as for Strapi itself and can be found in the Strapi documentation. -**Supported Strapi versions:** +Additionally, this plugin requires you to have the **Strapi Webtools plugin** installed. +::: -Strapi v5 use `webtools-addon-sitemap@^1` +### Supported versions -Strapi v4 use `@pluginpal/webtools-addon-sitemap@^1.0.0-beta` +- Strapi v5 +- Strapi Webtools v1 -::: +### Installation Install the plugin in your Strapi project. diff --git a/packages/docs/docs/addons/sitemap/getting-started/introduction.md b/packages/docs/docs/addons/sitemap/getting-started/introduction.md index a0883c11..457a7dcf 100644 --- a/packages/docs/docs/addons/sitemap/getting-started/introduction.md +++ b/packages/docs/docs/addons/sitemap/getting-started/introduction.md @@ -6,18 +6,22 @@ slug: /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). +This plugin offers the ability to configure **server-side sitemaps**. It integrates with Strapi Webtools for streamlined URL management, while still providing flexibility to your specific sitemap needs. + +:::note +This plugin acts as an extension of the core `strapi-plugin-webtools`. Please install and configure that before proceeding. ::: ## ✨ Features -- **Multilingual** (Implements `rel="alternate"` with `@strapi/plugin-i18n`) +- **Multilingual** (Implements `rel="alternate"` using the [official i18n Strapi patterns](https://docs.strapi.io/dev-docs/i18n)) +- **Admin UI** (Easily configure your sitemaps using the admin UI) - **URL bundles** (Bundle URLs by type and add them to the sitemap XML) +- **Custom URLs** (URLs of pages which are not managed in Strapi) - **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) + diff --git a/packages/docs/docs/addons/sitemap/getting-started/usage.md b/packages/docs/docs/addons/sitemap/getting-started/usage.md index 6f0bb3c8..a6b1050e 100644 --- a/packages/docs/docs/addons/sitemap/getting-started/usage.md +++ b/packages/docs/docs/addons/sitemap/getting-started/usage.md @@ -8,7 +8,11 @@ slug: /addons/sitemap/usage 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**. ## URL bundles -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. +:::caution +For a content type to be added to the sitemap through URL bundles, it needs to have Webtools enabled. Read about how to enable Webtools on it's [documentation](/webtools/usage). +::: + +An 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. URLs coming from a URL bundle will get the following XML attributes: @@ -17,6 +21,8 @@ URLs coming from a URL bundle will get the following XML attributes: - `` - `` +URL bundle + ## Custom URLs 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. @@ -25,3 +31,17 @@ Custom URLs will get the following XML attributes: - `` - `` - `` + +Custom URL + +## Generate +After you've successfully configured your sitemap it's time to generate it. You can generate the sitemap manually by clicking the 'Generate sitemap' button in the admin panel. + +By default your sitemap will be generated periodically through cron. Optionally you can also configure the plugin to update the sitemap every time your content gets updated. + +You can set that up using the [plugins configuration](/webtools/addons/sitemap/configuration). + +## Access +After you've followed the steps above you can now access your sitemap through the REST api of strapi. It will be available at: + +https://localhost:1337/api/sitemap/index.xml. diff --git a/packages/docs/docs/addons/sitemap/settings/introduction.md b/packages/docs/docs/addons/sitemap/settings/introduction.md index 6b9cae0f..a5811ab0 100644 --- a/packages/docs/docs/addons/sitemap/settings/introduction.md +++ b/packages/docs/docs/addons/sitemap/settings/introduction.md @@ -5,3 +5,6 @@ slug: /addons/sitemap/settings --- # Settings +Settings can be changed in the admin section of the plugin. In the last tab (Settings) you will find the settings as described below. + +Sitemap settings diff --git a/packages/docs/docs/getting-started/installation.md b/packages/docs/docs/getting-started/installation.md index 9f16566f..94fb539c 100644 --- a/packages/docs/docs/getting-started/installation.md +++ b/packages/docs/docs/getting-started/installation.md @@ -8,15 +8,13 @@ slug: / :::prerequisites Complete installation requirements are the exact same as for Strapi itself and can be found in the Strapi documentation. +::: +### Supported versions -**Supported Strapi versions:** - -Strapi v5 use `strapi-plugin-webtools@^1` +- Strapi v5 -Strapi v4 use `@pluginpal/webtools-core@^1.0.0-beta` - -::: +### Installation Install the plugin in your Strapi project. @@ -50,4 +48,6 @@ After successful installation you have to rebuild the admin UI so it'll include -Enjoy 🎉 +### Enabling + +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). diff --git a/packages/docs/docs/getting-started/usage.md b/packages/docs/docs/getting-started/usage.md index 90408430..78ca98d5 100644 --- a/packages/docs/docs/getting-started/usage.md +++ b/packages/docs/docs/getting-started/usage.md @@ -10,3 +10,17 @@ This plugin is specifically designed for usage in Strapi managed websites. Hence See below a screenshot of how to enable webtools for a given collection type. Enable webtools + +
+
+ +:::tip +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. + +```md title="schema.json" +pluginOptions: { + webtools: { + enabled: true, + }, +}, +::: diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts index a9c08b0d..3564d633 100644 --- a/packages/docs/sidebars.ts +++ b/packages/docs/sidebars.ts @@ -96,14 +96,6 @@ const sidebars = { "addons/sitemap/getting-started/cli", ], }, - { - type: "category", - collapsed: false, - label: "📦 API", - items: [ - "addons/sitemap/api/rest", - ], - }, { type: "category", collapsed: false, diff --git a/packages/docs/static/img/assets/addons/sitemap/URL-bundle.png b/packages/docs/static/img/assets/addons/sitemap/URL-bundle.png new file mode 100644 index 00000000..f32cb394 Binary files /dev/null and b/packages/docs/static/img/assets/addons/sitemap/URL-bundle.png differ diff --git a/packages/docs/static/img/assets/addons/sitemap/custom-url.png b/packages/docs/static/img/assets/addons/sitemap/custom-url.png new file mode 100644 index 00000000..cfb5f4e4 Binary files /dev/null and b/packages/docs/static/img/assets/addons/sitemap/custom-url.png differ diff --git a/packages/docs/static/img/assets/addons/sitemap/settings.png b/packages/docs/static/img/assets/addons/sitemap/settings.png new file mode 100644 index 00000000..9f194c81 Binary files /dev/null and b/packages/docs/static/img/assets/addons/sitemap/settings.png differ