FixedLink

Adds short links on your own domain to Payload documents, with links that keep working after slug changes through the FixedLink service.

Community 0 MIT v0.1.0

Installation

pnpm add @fixedlink/payload

About

FixedLink is a Payload plugin that publishes a short link for each document on a domain you control. When a document's slug changes months later the short URL stays the same, because the plugin updates the link's destination instead of replacing it. The links are managed by the FixedLink service, so the plugin needs a paid API key from fixed.link. Each synced collection gets a group field in the sidebar holding the link id, slug, short URL, destination and domain. A custom React panel renders the short link with a copy button, click counts over the last week, month, quarter and year, a QR code toggle, a domain picker and a checkbox to opt a document out. The ids are stored on the document rather than fetched, so the panel renders before any request finishes and the sync is idempotent. Integration is hook based. A `beforeChange` hook calls the FixedLink API to create or update the link, folding the result into the same write the editor asked for so drafts do not gain an extra version per publish. An `afterDelete` hook retires the link with a configurable `onDelete` of `pause`, `delete` or `keep` (paused by default, since a short link may live on a poster or in sent email). The API key stays server side, and four admin endpoints mounted under `/fixedlink` proxy data to the panel, refusing anyone not signed in to Payload. You configure it with a required `apiKey`, a `collections` array whose `url` function returns the public address of a document (or null to skip it), and per-collection `tags`, `monitor` and `domainId`. A save is never blocked: if FixedLink is unreachable the failure is logged and the sidebar offers a retry button. The domain is fixed once a link exists because the FixedLink API cannot move links between domains, so the picker goes read-only after the first save. Setting `enabled` to false leaves the fields in place so no link ids are lost.

Package info

Package name
@fixedlink/payload
Latest version
0.1.0
Unpacked size
106 kB
License
MIT
Last publish
Aug 21, 2026

Similar plugins

More in Content