Skip to content

[6.x] Add shareable draft preview links - #15274

Open
jackmcdade wants to merge 6 commits into
6.xfrom
feature/shareable-draft-preview-links
Open

[6.x] Add shareable draft preview links#15274
jackmcdade wants to merge 6 commits into
6.xfrom
feature/shareable-draft-preview-links

Conversation

@jackmcdade

@jackmcdade jackmcdade commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Login-free shareable preview links for unpublished, scheduled, expired, and working-copy entries, minted from the publish form.
  • Tokens resolve content live: follow the current draft by default, or pin a specific revision from revision history.
  • Reuses unexpired tokens, honors preview targets, bypasses Protect schemes, and shows a frontend draft/revision banner with X-Robots-Tag: noindex.

Screenshots

CleanShot 2026-08-25 at 11 41 57@2x CleanShot 2026-08-25 at 11 42 28@2x

Test plan

  • Copy a preview link from a draft entry (no revisions) as a guest and confirm the page renders
  • Copy a link from a published entry with a working copy and confirm unpublished edits show
  • Share a specific revision from revision history and confirm that frozen content is served
  • Click Share twice and confirm the same URL is reused until expiry
  • Confirm a token for entry A does not unlock entry B
  • Confirm expired / missing-revision tokens 404
  • Confirm a protected entry is visible via the share link without logging in
  • Confirm the draft/revision banner appears and X-Robots-Tag: noindex is set

Made with Cursor

jackmcdade and others added 5 commits August 20, 2026 15:44
Login-free tokens for unpublished, scheduled, and working-copy entries, minted from the publish form.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pin specific revisions, reuse unexpired tokens, honor preview targets, skip protect schemes, and show a draft banner. Share from revision history is an icon with a tooltip.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add the required Statamic trans import, make the frontend banner configurable, only inject it into HTML documents, and give TokenRepository a default all() so Eloquent/custom drivers do not fatal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Expiry is the caller's concern. Shared preview reuse still skips expired tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant