Thinkmill / Thinkmill/keystatic

Slug field: execute `generate` on every save to ensure valid slugs

Open
#1,211 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
2.4k
Forks
159
Avg merge
21h 41m
Merged PRs (30d)
2

Description

Hi
It's nice that we can give the user control over slugs, that makes sense in some places. But it would be very helpful if generate is not only executed on "Regenerate"-Click but also on every save.
I had assumed that this would happen, but unfortunately the CMS user can "break" the slug with spaces, non-alphanumeric characters etc.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the slug field implementation and its existing generate/“Regenerate” handling. Trace how saving a field is processed, then verify that saving a slug containing spaces or non-alphanumeric characters produces the same valid result as regeneration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
content
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.