jacobobryant / platypub

A publishing platform built with Biff
MIT License
65 stars 13 forks source link

Slug value generated from post title would be helpful #26

Closed jeffp42ker closed 2 years ago

jeffp42ker commented 2 years ago

When creating a post's slug I typically:

It'd be helpful if this transformation was available as the candidate slug value once the title is completed.

jacobobryant commented 2 years ago

Good idea. For ease of implementation, maybe a good first step would be to do it on document save? i.e. if the title is non-empty and the slug is empty, then infer the slug and save it to the document. Then it'd also be easy to query the db to ensure the slug is unique without needing to add a date or similar.