Manages slugs, canonical paths and a published route registry for chosen collections. Each collection gets a prefix and optional parent field for nested paths, and a WordPress-style permalink editor replaces the raw slug and path fields. Includes server-side helpers to find a document by path. Targets Payload 4 prerelease versions.
WordPress-style slugs, canonical paths, permalinks, and routing helpers for Payload CMS.
Installation
npm i @sittari/payload-permalink0
Stars
0
Forks
0
Open Issues
2 months ago
Last Updated
23
Weekly Downloads
v1.1.1
npm Version
137.6 KB
Unpacked Size
1
Dependencies
00 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 0 |
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
| Nov 7, 2026 | 0 |
| Nov 6, 2026 | 0 |
| Nov 5, 2026 | 0 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
| Nov 2, 2026 | 0 |
| Nov 1, 2026 | 0 |
| Oct 31, 2026 | 0 |
| Oct 30, 2026 | 0 |
| Oct 29, 2026 | 0 |
| Oct 28, 2026 | 0 |
| Oct 27, 2026 | 0 |
| Oct 26, 2026 | 0 |
| Oct 25, 2026 | 0 |
| Oct 24, 2026 | 0 |
| Oct 23, 2026 | 0 |
| Oct 22, 2026 | 0 |
| Oct 21, 2026 | 0 |
| Oct 20, 2026 | 0 |
| Oct 19, 2026 | 0 |
| Oct 18, 2026 | 0 |
| Oct 17, 2026 | 0 |
| Oct 16, 2026 | 0 |
| Oct 15, 2026 | 0 |
| Oct 14, 2026 | 0 |
| Oct 13, 2026 | 0 |
| Oct 12, 2026 | 0 |
| Oct 11, 2026 | 0 |
| Oct 10, 2026 | 0 |
| Oct 9, 2026 | 0 |
| Oct 8, 2026 | 0 |
| Oct 7, 2026 | 0 |
| Oct 6, 2026 | 0 |
| Oct 5, 2026 | 0 |
| Oct 4, 2026 | 0 |
| Oct 3, 2026 | 0 |
| Oct 2, 2026 | 0 |
| Oct 1, 2026 | 0 |
| Sep 30, 2026 | 0 |
| Sep 29, 2026 | 0 |
| Sep 28, 2026 | 0 |
| Sep 27, 2026 | 0 |
| Sep 26, 2026 | 0 |
| Sep 25, 2026 | 0 |
| Sep 24, 2026 | 0 |
| Sep 23, 2026 | 0 |
| Sep 22, 2026 | 0 |
| Sep 21, 2026 | 0 |
| Sep 20, 2026 | 0 |
| Sep 19, 2026 | 0 |
| Sep 18, 2026 | 0 |
| Sep 17, 2026 | 0 |
| Sep 16, 2026 | 0 |
| Sep 15, 2026 | 0 |
| Sep 14, 2026 | 0 |
| Sep 13, 2026 | 0 |
| Sep 12, 2026 | 0 |
| Sep 11, 2026 | 0 |
| Sep 10, 2026 | 0 |
| Sep 9, 2026 | 0 |
| Sep 8, 2026 | 0 |
| Sep 7, 2026 | 0 |
Shared by 8 plugins in sittari-studio/payload-plugins.
23−206 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 23 |
| Dec 5, 2026 | 12 |
| Dec 4, 2026 | 13 |
| Dec 3, 2026 | 13 |
| Dec 2, 2026 | 11 |
| Dec 1, 2026 | 11 |
| Nov 30, 2026 | 11 |
| Nov 29, 2026 | 9 |
| Nov 28, 2026 | 8 |
| Nov 27, 2026 | 9 |
| Nov 26, 2026 | 9 |
| Nov 25, 2026 | 4 |
| Nov 24, 2026 | 4 |
| Nov 23, 2026 | 4 |
| Nov 22, 2026 | 6 |
| Nov 21, 2026 | 6 |
| Nov 20, 2026 | 13 |
| Nov 19, 2026 | 14 |
| Nov 18, 2026 | 21 |
| Nov 17, 2026 | 20 |
| Nov 16, 2026 | 22 |
| Nov 15, 2026 | 21 |
| Nov 14, 2026 | 22 |
| Nov 13, 2026 | 13 |
| Nov 12, 2026 | 13 |
| Nov 11, 2026 | 5 |
| Nov 10, 2026 | 11 |
| Nov 9, 2026 | 15 |
| Nov 8, 2026 | 14 |
| Nov 7, 2026 | 17 |
| Nov 6, 2026 | 17 |
| Nov 5, 2026 | 22 |
| Nov 4, 2026 | 23 |
| Nov 3, 2026 | 17 |
| Nov 2, 2026 | 11 |
| Nov 1, 2026 | 11 |
| Oct 31, 2026 | 7 |
| Oct 30, 2026 | 7 |
| Oct 29, 2026 | 1 |
| Oct 28, 2026 | 0 |
| Oct 27, 2026 | 2 |
| Oct 26, 2026 | 4 |
| Oct 25, 2026 | 7 |
| Oct 24, 2026 | 14 |
| Oct 23, 2026 | 14 |
| Oct 22, 2026 | 16 |
| Oct 21, 2026 | 22 |
| Oct 20, 2026 | 22 |
| Oct 19, 2026 | 20 |
| Oct 18, 2026 | 18 |
| Oct 17, 2026 | 15 |
| Oct 16, 2026 | 16 |
| Oct 15, 2026 | 20 |
| Oct 14, 2026 | 14 |
| Oct 13, 2026 | 14 |
| Oct 12, 2026 | 15 |
| Oct 11, 2026 | 15 |
| Oct 10, 2026 | 21 |
| Oct 9, 2026 | 29 |
| Oct 8, 2026 | 26 |
| Oct 7, 2026 | 29 |
| Oct 6, 2026 | 39 |
| Oct 5, 2026 | 40 |
| Oct 4, 2026 | 45 |
| Oct 3, 2026 | 44 |
| Oct 2, 2026 | 36 |
| Oct 1, 2026 | 34 |
| Sep 30, 2026 | 40 |
| Sep 29, 2026 | 29 |
| Sep 28, 2026 | 43 |
| Sep 27, 2026 | 38 |
| Sep 26, 2026 | 42 |
| Sep 25, 2026 | 50 |
| Sep 24, 2026 | 52 |
| Sep 23, 2026 | 53 |
| Sep 22, 2026 | 62 |
| Sep 21, 2026 | 81 |
| Sep 20, 2026 | 360 |
| Sep 19, 2026 | 350 |
| Sep 18, 2026 | 342 |
| Sep 17, 2026 | 347 |
| Sep 16, 2026 | 341 |
| Sep 15, 2026 | 340 |
| Sep 14, 2026 | 309 |
| Sep 13, 2026 | 33 |
| Sep 12, 2026 | 38 |
| Sep 11, 2026 | 43 |
| Sep 10, 2026 | 39 |
| Sep 9, 2026 | 66 |
| Sep 8, 2026 | 220 |
| Sep 7, 2026 | 229 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1294311885-permalink)<a href="https://payloaddirectory.dev/plugins/1294311885-permalink"><img src="https://payloaddirectory.dev/badge/1294311885-permalink.svg" alt="Payload Directory"></a>README
A WordPress-style permalink system for Payload CMS. The plugin owns the slug, canonical path, published route registry, permalink editor, lookup, pagination, and path rebuilding for selected collections.
import { permalinkPlugin } from '@sittari/payload-permalink';
permalinkPlugin({
siteUrl: 'https://example.com',
localePrefix: 'as-needed',
collections: {
pages: { prefix: '' },
posts: { prefix: 'blog' },
categories: {
prefix: 'category',
parentField: 'parent',
},
},
});
A collection prefix works like a WordPress custom post type rewrite prefix:
pages + slug about -> /aboutposts + slug hello-world -> /blog/hello-worldshoes / boots -> /category/shoes/bootsUse the reserved slug __home for the root of a collection prefix:
pages + __home -> /pages + __home -> /ukposts + __home -> /blog__home is preserved by slug normalization and omitted only when composing the
canonical path. The constant is exported as HOME_SLUG.
The plugin uses the collection's admin.useAsTitle field as the slug source,
falling back to title. If a collection already has a text slug field, it is
reused; otherwise the plugin adds a plain localized text field. Slugs are not
unique on their own: they are normalized URL segments, while final published
path uniqueness is enforced by the route registry. If a published path is
already claimed, the new document's slug is suffixed once with -{documentID}
and its path is recomputed. Drafts and autosaves are left unchanged because they
do not reserve routes. If the suffixed path is also occupied, normal permalink
validation fails.
The raw slug and path fields are hidden and replaced by a WordPress-style permalink display which edits only the final slug segment.
The permalink editor exposes stable global classes and uses low-specificity default styles, so client app CSS can override them directly:
.sittari-permalink-field {
/* container */
}
.sittari-permalink-field__label {
}
.sittari-permalink-field__prefix {
}
.sittari-permalink-field__link {
}
.sittari-permalink-field__placeholder {
}
.sittari-permalink-field__input {
}
.sittari-permalink-field__error {
}
.sittari-permalink-field__button {
}
.sittari-permalink-field__button--edit {
}
.sittari-permalink-field__button--ok {
}
.sittari-permalink-field__button--cancel {
}
State classes are applied to the root element as needed:
.sittari-permalink-field--editing {
}
.sittari-permalink-field--error {
}
.sittari-permalink-field--disabled {
}
localePrefix defaults to as-needed:
en: /about
uk: /uk/about
Use always to prefix every locale:
en: /en/about
uk: /uk/about
When parentField is used, the plugin which creates that self-referencing
relationship (for example @payloadcms/plugin-nested-docs) must run before
permalinkPlugin. Child paths append their slug to the parent's canonical path.
Drafts and autosaves do not reserve routes. Publishing claims the canonical path, changing a published permalink moves the claim, and unpublishing, trashing, or deleting releases it. Global path uniqueness is enforced by the internal route registry.
Create bound helpers in server-only code:
import { createPathHelpers } from '@sittari/payload-permalink';
import { getPayload } from 'payload';
import config from '@payload-config';
export const paths = createPathHelpers({
getPayload: () => getPayload({ config }),
});
const result = await paths.findDocumentByPath({
path: '/blog/hello-world',
overrideAccess: false,
});
Lookup resolves the internal route first and then loads the target document.
Terminal /page/:page paths are interpreted automatically, with exact stored
routes taking precedence over pagination fallback.
nested docs
Official plugin for nesting Payload documents inside one another
100151.9k/wk46.1kv3 v4
payload slug
Slug field with Auto/Manual modes, nested source paths, localization and enforced uniqueness
802.4k/wk0v3
localized slugs
Copies localized slug and full path values into a per-locale localizedSlugs field for multi-language Payload sites
7881/wk9v3
path
Stored, indexed URL paths for Payload 4 pages and posts built from a parent and a slug
75270/wk10v4
slug field
Configurable slug field factory for Payload collections with localized instructions and overrides
6319/wk0v4
redirects
Manage internal and external redirects from the Payload admin panel
100200.1k/wk46.1kv3 v4