@easy-cms/plugin-redirects 0.22.0 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
# @easy-cms/plugin-redirects
|
|
2
2
|
|
|
3
|
-
Redirects for [Easy CMS](https://
|
|
4
|
-
|
|
3
|
+
Redirects for Easy CMS: a Redirects list under Settings in the admin, and automatic redirects when a published page's address changes. Part of [Easy CMS](https://github.com/maritonx/easy-cms), the embedded, code-first headless CMS for Nuxt and Next.js.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @easy-cms/plugin-redirects
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or `pnpm add`, `yarn add` or `bun add`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
5
14
|
|
|
6
15
|
```ts
|
|
7
16
|
import { redirectsPlugin } from '@easy-cms/plugin-redirects'
|
|
@@ -25,4 +34,8 @@ const redirect = await resolveRedirect(cms, new URL(request.url))
|
|
|
25
34
|
if (redirect) return Response.redirect(new URL(redirect.location, request.url), redirect.status)
|
|
26
35
|
```
|
|
27
36
|
|
|
28
|
-
|
|
37
|
+
## Links
|
|
38
|
+
|
|
39
|
+
[Redirects](https://maritonx.github.io/easy-cms/guide/redirects) · [Documentation](https://maritonx.github.io/easy-cms/) ([ภาษาไทย](https://maritonx.github.io/easy-cms/th/)) · [GitHub](https://github.com/maritonx/easy-cms)
|
|
40
|
+
|
|
41
|
+
MIT License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easy-cms/plugin-redirects",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.2",
|
|
4
4
|
"description": "Redirects for Easy CMS: 301s managed in the admin, automatic redirects when a page's address changes",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@easy-cms/core": "^0.22.
|
|
19
|
+
"@easy-cms/core": "^0.22.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@easy-cms/core": "^0.22.
|
|
23
|
-
"@easy-cms/db-sqlite": "^0.22.
|
|
22
|
+
"@easy-cms/core": "^0.22.2",
|
|
23
|
+
"@easy-cms/db-sqlite": "^0.22.2"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=22.12"
|