talha-asad / mongoose-url-slugs

Create URL compatiable slugs on mongoose models, ensuring uniqueness.
MIT License
40 stars 22 forks source link

Feature Request: Ability to slugify all existing articles #27

Closed MadOgre closed 7 years ago

talha-asad commented 7 years ago

You can use the option alwaysRecreate and loop over existing documents to create slugs for existing articles.

Another way to do it is to, call markModified on the slug building field and then calling save on your existing documents.