Hi, sorry if this has been covered before but I couldn't find it anywhere in the docs or issues.
I want to add a generated field to create a slug from fields[name] that I can use as the file name. I see there is a slugify type but no idea what syntax I need to use and whether I can specifiy a field to use?
Here's my config, any help would be appreciated 馃憤
companies:
allowedFields: ["name", "description", "location"]
branch: "master"
commitMessage: "Add company - {fields.slug}"
filename: "{fields.name}"
format: "json"
generatedFields:
slug:
type: slugify
???? <-- What goes here?
dateCreated:
type: date
options:
format: "timestamp-seconds"
moderation: true
name: "Dev Wales"
path: "_data/companies"
requiredFields: ["name"]
@eduardoboucas could you please help us out?
I had been looking all over and found the answer here: https://github.com/eduardoboucas/hugo-plus-staticman/blob/master/staticman.yml
generatedFields:
date:
type: date
slug:
type: slugify
options:
field: title
filename: "{fields.slug}"
Most helpful comment
I had been looking all over and found the answer here: https://github.com/eduardoboucas/hugo-plus-staticman/blob/master/staticman.yml