Skip to content

Commit 0ce8a84

Browse files
authored
Merge pull request #346 from pluginpal/chore/documentation-quality
Chore/documentation quality
2 parents f597f4d + 55c61ee commit 0ce8a84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1728
-190
lines changed

.changeset/hot-grapes-allow.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+
Chore/documentation quality

packages/docs/docs/addons/links/getting-started/ckeditor.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,26 @@ displayed_sidebar: webtoolsLinksSidebar
44
slug: /addons/links/ckeditor
55
---
66

7+
import ThemedImage from '@theme/ThemedImage';
8+
import useBaseUrl from '@docusaurus/useBaseUrl';
9+
710
# Ckeditor integration
8-
This addon has an integration with [the Ckeditor plugin](https://github.com/nshenderov/strapi-plugin-ckeditor). If the Ckeditor plugin is installed this addon will replace the link button in the editor. With this new button you can create internal links in the ckeditor.
11+
This addon has an integration with [the Ckeditor plugin](https://github.com/nshenderov/strapi-plugin-ckeditor). If the Ckeditor plugin is installed this addon will replace the link button in the editor. With this new button you can create internal links in the ckeditor.
912

10-
<img src="/webtools/img/assets/addons/links/ckeditor.png" alt="Ckeditor" />
13+
<ThemedImage
14+
alt="Ckeditor"
15+
sources={{
16+
light: useBaseUrl('/webtools/img/assets/addons/links/ckeditor-light.png'),
17+
dark: useBaseUrl('/webtools/img/assets/addons/links/ckeditor-light.png'),
18+
}}
19+
/>
1120

1221
If you click the link button it will open a modal in which you can manage your links.
1322

14-
<img src="/webtools/img/assets/addons/links/ckeditor-link-modal.png" alt="Ckeditor link modal" />
23+
<ThemedImage
24+
alt="Ckeditor link modal"
25+
sources={{
26+
light: useBaseUrl('/webtools/img/assets/addons/links/ckeditor-link-modal-light.png'),
27+
dark: useBaseUrl('/webtools/img/assets/addons/links/ckeditor-link-modal-light.png'),
28+
}}
29+
/>

packages/docs/docs/addons/links/getting-started/custom-field.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,29 @@ displayed_sidebar: webtoolsLinksSidebar
44
slug: /addons/links/custom-field
55
---
66

7+
import ThemedImage from '@theme/ThemedImage';
8+
import useBaseUrl from '@docusaurus/useBaseUrl';
9+
710
# Custom field
811
This addon introduces a new custom field which you can add to your content types. This field can be used in your content types to accommodate internal linking from one page to another.
912

10-
<img src="/webtools/img/assets/addons/links/link-custom-field.png" alt="Link custom field" />
13+
<ThemedImage
14+
alt="Link custom field"
15+
sources={{
16+
light: useBaseUrl('/webtools/img/assets/addons/links/link-custom-field-light.png'),
17+
dark: useBaseUrl('/webtools/img/assets/addons/links/link-custom-field-light.png'),
18+
}}
19+
/>
1120

1221
### This custom field will provide you three options in the advanced settings:
1322
* Set the link to "internal" and now you can search on something like "My first blog post". The field stores a documentId reference, so the link keeps working even if the slug or URL changes.
1423
* Set the link to "external" so you can enter a full url, e.g. https://strapi.io/
1524
* Set the link to "Internal & external links" and have both link options as described above, this is the default value.
1625

17-
<img src="/webtools/img/assets/addons/links/webtools-pro-link-addon-options.png" alt="Link advanced settings" />
26+
<ThemedImage
27+
alt="Link advanced settings"
28+
sources={{
29+
light: useBaseUrl('/webtools/img/assets/addons/links/webtools-pro-link-addon-options-light.png'),
30+
dark: useBaseUrl('/webtools/img/assets/addons/links/webtools-pro-link-addon-options-light.png'),
31+
}}
32+
/>

packages/docs/docs/addons/redirects/api/rest.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ The plugin exposes a REST API endpoint that you can use to implement the redirec
1414

1515
Use Public role or API Tokens as per Strapi defaults.
1616

17+
### Permissions
18+
19+
:::danger Permissions Required
20+
Before you can use the redirects endpoint publicly, you need to configure the **find** permission. Without proper permissions, you'll get a **403 Forbidden** error.
21+
22+
**Quick Setup in Settings > Users & Permissions > Roles > Public:**
23+
- `webtools-addon-redirects.redirect.find`
24+
25+
For detailed permission configuration including API tokens and admin panel access, see the [API Permissions](/webtools/addons/redirects/api-permissions) and [Admin Permissions](/webtools/addons/redirects/admin-permissions) documentation.
26+
:::
27+
1728
<ApiCall>
1829

1930
<Request>
@@ -71,11 +82,3 @@ Use Public role or API Tokens as per Strapi defaults.
7182

7283
</ApiCall>
7384

74-
## Permissions
75-
76-
Before you can use the redirects endpoint publicly, you need to configure the *find* permission.
77-
78-
### Quick Setup
79-
80-
Enable in **Settings > Users & Permissions > Roles > Public**:
81-
- `webtools-addon-redirects.redirect.find`

packages/docs/docs/addons/redirects/configuration/auto-generate.md

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,97 @@ slug: /addons/redirects/configuration/auto-generate
66

77
# Auto generate
88

9-
When this option is set to true (which it is by default) the addon will automatically generate a redirect whenever you change the URL alias of a page. This way you will never have dead links in your website!
9+
## Overview
10+
11+
The auto-generate feature automatically creates redirects whenever you change the URL alias of a content entry in your Strapi application. This ensures visitors following old links will be seamlessly redirected to the new URL without encountering broken links or 404 errors.
12+
13+
## How it works
14+
15+
When enabled (which it is by default), the addon monitors URL alias changes and creates redirect entries automatically:
16+
17+
1. You change a page's URL from `/old-blog-post` to `/new-blog-post`
18+
2. The addon detects this change
19+
3. A redirect is automatically created: `/old-blog-post``/new-blog-post`
20+
4. Visitors using the old URL are redirected to the new location
21+
22+
## Why use this?
23+
24+
**Preserves SEO rankings**: Search engines have indexed your old URLs. Redirects ensure you don't lose search engine rankings when changing URLs.
25+
26+
**Prevents broken links**: External sites, bookmarks, and shared links pointing to your old URLs continue to work.
27+
28+
**Improves user experience**: Visitors are automatically sent to the correct page instead of seeing a 404 error.
29+
30+
**Saves time**: No need to manually track and create redirects for every URL change.
31+
32+
## Example scenario
33+
34+
Imagine you have a blog post at `/blog/how-to-use-strapi` that's been shared widely and indexed by Google. Later, you decide to rename it to `/blog/complete-strapi-guide`.
35+
36+
**With auto-generate enabled:**
37+
- You update the URL alias in Strapi
38+
- A redirect is automatically created
39+
- Old links continue to work
40+
- Your SEO rankings are preserved
41+
42+
**With auto-generate disabled:**
43+
- You update the URL alias in Strapi
44+
- Old links lead to 404 errors
45+
- You lose traffic from external links
46+
- You have to manually create redirects
47+
48+
## When to disable
49+
50+
You might want to disable auto-generate if:
51+
- You want full manual control over all redirects
52+
- You're doing bulk URL changes and want to review redirects afterwards
53+
- You're migrating content and have a custom redirect strategy
54+
55+
:::tip
56+
Keep this enabled for production sites. It's a safety net that prevents broken links automatically.
57+
:::
58+
59+
## Multiple URL Changes
60+
61+
When you change the same URL multiple times, the addon intelligently manages redirects to prevent chains:
62+
63+
**Scenario 1: First URL change**
64+
```
65+
Original URL: /my-article
66+
New URL: /my-article-updated
67+
68+
Result: Creates redirect /my-article → /my-article-updated ✓
69+
```
70+
71+
**Scenario 2: Second URL change (updates existing redirect)**
72+
```
73+
Current URL: /my-article-updated
74+
New URL: /my-article-final
75+
76+
Result:
77+
- Updates existing redirect to: /my-article → /my-article-final ✓
78+
- Creates new redirect: /my-article-updated → /my-article-final ✓
79+
```
80+
81+
This strategy prevents redirect chains and ensures all old URLs point directly to the current URL. Both `/my-article` and `/my-article-updated` will redirect straight to `/my-article-final` without intermediate hops.
82+
83+
:::tip Smart Redirect Management
84+
The addon automatically updates existing redirects that point to the old URL, ensuring no chains are created. This means you can freely change URLs multiple times without worrying about redirect performance.
85+
:::
86+
87+
## Chain Prevention
88+
89+
Auto-generate includes built-in protection against [redirect chains and loops](/addons/redirects/usage#redirect-chains-and-loops). If a URL change would create a chain or loop, the system will:
90+
91+
1. **Log an error** in your server console
92+
2. **Skip creating the redirect** automatically
93+
3. **Allow you to manually resolve** the conflict
94+
95+
Check your server logs if you suspect redirects aren't being created as expected.
96+
97+
## Difference from sitemap cron
98+
99+
Unlike the sitemap addon which uses a cron job to periodically regenerate files, redirects are created **instantly** when you change a URL. There's no delay and no need for scheduled tasks - redirects are event-driven and created the moment you save your changes.
10100

11101
###### Key: `auto_generate `
12102

packages/docs/docs/addons/redirects/configuration/default-status-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_label: 'Cron'
2+
sidebar_label: 'Default status code'
33
displayed_sidebar: webtoolsRedirectsSidebar
44
slug: /addons/redirects/configuration/default-status-code
55
---
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
sidebar_label: 'Admin Permissions'
3+
displayed_sidebar: webtoolsRedirectsSidebar
4+
slug: /addons/redirects/admin-permissions
5+
---
6+
7+
# 🔐 Admin Panel Permissions
8+
9+
Configure granular permissions to control what administrators can do with redirects in the Strapi admin panel.
10+
11+
---
12+
13+
## Configuration
14+
15+
To configure permissions for a role:
16+
17+
1. Go to **Strapi Admin → Settings → Administration Panel → Roles**.
18+
2. Choose the role (e.g., **Editor**, **Author**).
19+
3. Scroll to **Webtools-addon-redirects** plugin section.
20+
4. Enable the permissions needed for this role.
21+
5. Click **Save**.
22+
23+
---
24+
25+
## Available Permissions
26+
27+
The following table lists all available permissions for the Redirects addon in the admin panel:
28+
29+
| Permission | Description |
30+
|------------|-------------|
31+
| **Access the redirects plugin** | Gives access to the redirects overview page at `/plugins/webtools/redirects` |
32+
| **Create** | Allows to create new redirect rules |
33+
| **Read** | Allows to view existing redirect configurations |
34+
| **Update** | Allows to edit existing redirect rules |
35+
| **Delete** | Allows to remove redirect rules from the system |
36+
37+
---
38+
39+
## Permission Combinations
40+
41+
Common permission setups for different roles:
42+
43+
| Role | Access | Create | Read | Update | Delete |
44+
|------|--------|--------|------|--------|--------|
45+
| **Content Editor** ||||||
46+
| **Senior Editor** ||||||
47+
| **Viewer** ||||||
48+
49+
**Content Editor** - Can manage redirects but cannot delete them to prevent accidental data loss.
50+
51+
**Senior Editor** - Has full access to all redirect management features.
52+
53+
**Viewer** - Can view redirects in read-only mode without making changes.
54+
55+
---
56+
57+
## Super Admin Role
58+
59+
:::info Automatic Access
60+
The **Super Admin** role has all permissions enabled by default and cannot be modified. All configurations are in read-only mode.
61+
:::
62+
63+
The **Settings** button visible in the permissions UI is for configuring RBAC conditions on other roles, but has no effect on Super Admin permissions.
64+
65+
---
66+
67+
## Testing Permissions
68+
69+
To verify permissions are configured correctly:
70+
71+
1. Create a test user with the configured role
72+
2. Log in as that user
73+
3. Navigate to **Webtools → Redirects**
74+
4. Verify the available actions match the configured permissions
75+
76+
:::tip
77+
Restart Strapi and clear your browser cache after making permission changes.
78+
:::
79+
80+
---
81+
82+
## Troubleshooting
83+
84+
**Webtools menu not visible:**
85+
- Verify the role has at least "Access the redirects plugin" permission enabled
86+
- Log out and log back in
87+
- Clear browser cache
88+
89+
**Action buttons missing:**
90+
- Check that Create/Update/Delete permissions are enabled for the role
91+
- Refresh the page
92+
- Check browser console for errors
93+
94+
**Permission changes not applying:**
95+
- Verify you clicked "Save" after modifying permissions
96+
- Restart Strapi server
97+
- Have the user log out and log back in
98+
- Clear browser cache and cookies

0 commit comments

Comments
 (0)