Repository navigation
Replies: 2 comments
|
Date parts cannot be determined until the entry is saved, but we can still use the current date/time to show a preview. I think WordPress actually has a real time preview. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Show live slug/filename preview when creating or editing an entry
Description
When creating a new entry in a folder collection, there is currently no way to see what the generated filename (slug) will be before saving. The slug is computed on save based on the collection's
slugtemplate (e.g.{{year}}-{{month}}-{{day}}-{{slug}}), but the author has no visibility into the result while editing.It would be very helpful to display a live preview of the generated filename somewhere in the entry editor UI — for example, below the title field or in the editor toolbar/header area.
What
slugtemplate.slug.encoding,slug.clean_accents,slug.sanitize_replacement, and any template tags like{{year}},{{month}},{{day}},{{slug}},{{uuid}}, etc.).Example
For a collection configured with:
If the user types the title "My First Blog Post!" on April 25, 2026, the editor would show a preview like:
This preview would update live as the title changes.
Why
slugtemplates with multiple fields, a live preview helps verify the template produces the expected output.Suggested UX
A few possible placements ( just ideas):
Filename: 2026-04-25-my-post-title.mdThe preview could be styled as a non-editable, secondary-text element so it doesn't clutter the editing experience.
Additional Context
slugstring field to the collection's fields, but this adds an extra manual step for authors and can lead to inconsistencies.slug.encoding,slug.clean_accents,slug.sanitize_replacement) by making their effects visible to the author in real time.All reactions