A Payload site, ready to clone

Placeholder: rounded tiles in soft blue and orange

The collection generator gets a link field

A field for a link

A collection made with pnpm make:collection can now have url fields, such as a hotel’s website or its booking page, with --field website:url. A field can be translated (:localized) and required (:required), as the other types.

Checked twice

On save, the field takes a site path, an anchor, or an https:, http:, mailto: or tel: link. Anything else is refused with a message in the editor’s language. On the page, the value is checked again before it becomes a link, so a value saved some other way never reaches an href.

Other sites open in a new tab

A link to another site opens in a new tab and tells screen readers so, as the menus do. Site paths, anchors, mailto: and tel: stay in the page.

A collection with two link fields
pnpm make:collection hotels --slug acmeHotels --path /hotels \
  --singular en=Hotel --plural en=Hotels \
  --field website:url:required --field booking:url:localized