From d632cf71ddecb2129027ac433c7fcc701e93c48e Mon Sep 17 00:00:00 2001 From: Tim Schipper Date: Sat, 6 Sep 2025 13:37:21 +0200 Subject: [PATCH] feat: setup linkField docs --- packages/docs/docs/addons/introduction.md | 1 + .../linkfield/configuration/introduction.md | 22 ++++++++ .../linkfield/getting-started/installation.md | 55 +++++++++++++++++++ .../linkfield/getting-started/introduction.md | 43 +++++++++++++++ .../addons/linkfield/getting-started/usage.md | 47 ++++++++++++++++ packages/docs/sidebars.ts | 37 +++++++++++++ 6 files changed, 205 insertions(+) create mode 100644 packages/docs/docs/addons/linkfield/configuration/introduction.md create mode 100644 packages/docs/docs/addons/linkfield/getting-started/installation.md create mode 100644 packages/docs/docs/addons/linkfield/getting-started/introduction.md create mode 100644 packages/docs/docs/addons/linkfield/getting-started/usage.md diff --git a/packages/docs/docs/addons/introduction.md b/packages/docs/docs/addons/introduction.md index eac07f68..2df85c73 100644 --- a/packages/docs/docs/addons/introduction.md +++ b/packages/docs/docs/addons/introduction.md @@ -12,4 +12,5 @@ To enhance Webtools in a modular way, the core plugin allows addons to be regist + diff --git a/packages/docs/docs/addons/linkfield/configuration/introduction.md b/packages/docs/docs/addons/linkfield/configuration/introduction.md new file mode 100644 index 00000000..92dd8a4d --- /dev/null +++ b/packages/docs/docs/addons/linkfield/configuration/introduction.md @@ -0,0 +1,22 @@ +--- +sidebar_label: 'Introduction' +displayed_sidebar: webtoolsLinkfieldSidebar +slug: /addons/linkfield +--- + +# 🔧 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-linkfield': { + enabled: true, + config: { + addons: [ + '@pluginpal/webtools-addon-linkfield' + ], + }, + }, +}); +``` diff --git a/packages/docs/docs/addons/linkfield/getting-started/installation.md b/packages/docs/docs/addons/linkfield/getting-started/installation.md new file mode 100644 index 00000000..5fbb968a --- /dev/null +++ b/packages/docs/docs/addons/linkfield/getting-started/installation.md @@ -0,0 +1,55 @@ +--- +sidebar_label: 'Installation' +displayed_sidebar: webtoolsLinkfieldSidebar +slug: /addons/linkfield/installation +--- + +# ⏳ Installation + +:::prerequisites +Complete installation requirements are the exact same as for Strapi itself and can be found in the Strapi documentation. + +This guide will walk you through installing the Linkfield add-on for Webtools Pro. +::: + +### Supported versions + +- Strapi v5 +- Strapi Webtools Pro - core plugin installed and configured +- Node.js v18 or higher + +### Installation + +Install the plugin in your Strapi project. + + + + ``` + yarn add webtools-addon-linkfield + ``` + + + ``` + npm install webtools-addon-linkfield --save + ``` + + + +After successful installation you have to rebuild the admin UI so it'll include this plugin. To rebuild and restart Strapi run: + + + + ``` + yarn build + yarn develop + ``` + + + ``` + npm run build + npm run develop + ``` + + + +Enjoy 🎉 diff --git a/packages/docs/docs/addons/linkfield/getting-started/introduction.md b/packages/docs/docs/addons/linkfield/getting-started/introduction.md new file mode 100644 index 00000000..378c1afe --- /dev/null +++ b/packages/docs/docs/addons/linkfield/getting-started/introduction.md @@ -0,0 +1,43 @@ +--- +sidebar_label: 'Introduction' +displayed_sidebar: webtoolsLinkfieldSidebar +slug: /addons/linkfield +--- + +# Webtools Linkfield Add-on + +The **Linkfield add-on** for Webtools Pro provides a powerful custom field type that allows content creators to easily create internal links within their Strapi CMS content. This field type streamlines the process of linking to other content entries, pages, or sections within your application. + +## What is Linkfield? + +Linkfield is a custom field component that integrates seamlessly with your Strapi content types, providing an intuitive interface for selecting and managing internal links. Instead of manually typing URLs or remembering content IDs, users can search and select content through a user-friendly modal interface. + +## Key Features + +- **🔗 Internal Link Management** - Easy selection of internal content for linking +- **🔍 Smart Search** - Find content quickly with built-in search functionality +- **📝 Content Type Support** - Works with all your custom content types +- **🌐 Multi-language Support** - Full support for internationalized content +- **⚡ Real-time Validation** - Instant validation of link targets +- **🎨 Intuitive UI** - Clean, user-friendly interface integrated with Strapi's design system + +## How it Works + +The Linkfield add-on adds a new field type to your Strapi content type builder. When content creators use this field, they can: + +1. Click on the field to open a link picker modal +2. Browse or search through available content entries +3. Select the desired target content +4. The field automatically stores the reference and displays the linked content title + +## Use Cases + +- **Blog Posts** - Link to related articles or author pages +- **Product Pages** - Connect products to categories or related items +- **Navigation Menus** - Build dynamic navigation with content links +- **Landing Pages** - Create call-to-action links to specific content +- **Documentation** - Cross-reference between help articles + +## Getting Started + +Ready to start using Linkfield? Continue to the [installation guide](./getting-started/installation.md) to set up the add-on in your Strapi project. diff --git a/packages/docs/docs/addons/linkfield/getting-started/usage.md b/packages/docs/docs/addons/linkfield/getting-started/usage.md new file mode 100644 index 00000000..4f272027 --- /dev/null +++ b/packages/docs/docs/addons/linkfield/getting-started/usage.md @@ -0,0 +1,47 @@ +--- +sidebar_label: 'Usage' +displayed_sidebar: webtoolsLinkfieldSidebar +slug: /addons/linkfield/usage +--- + +# 💡 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 +:::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: + +- `` +- `` +- `` +- `` + +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. + +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/sidebars.ts b/packages/docs/sidebars.ts index 6b34797b..f25bf633 100644 --- a/packages/docs/sidebars.ts +++ b/packages/docs/sidebars.ts @@ -48,6 +48,11 @@ const sidebars = { label: "Sitemap addon", href: '/addons/sitemap', }, + { + type: "link", + label: "LinkField addon", + href: '/addons/linkfield', + }, ], }, { @@ -125,6 +130,38 @@ const sidebars = { ], }, ], + webtoolsLinkfieldSidebar: [ + { + type: "link", + label: "⬅️ Back to Webtools Core docs", + href: "/addons", + }, + { + type: "category", + collapsed: false, + label: "🔌 LinkField addon", + items: [ + { + type: "category", + collapsed: false, + label: "🚀 Getting Started", + items: [ + "addons/linkfield/getting-started/introduction", + "addons/linkfield/getting-started/installation", + "addons/linkfield/getting-started/usage", + ], + }, + { + type: "category", + collapsed: false, + label: "🔧 Configuration", + items: [ + "addons/linkfield/configuration/introduction", + ], + }, + ], + }, + ], }; module.exports = sidebars;