thedodobird2 / contentful-hugo

A tool for Hugo that pulls content from the Contentful API
Apache License 2.0
4 stars 1 forks source link

Improve Generation of Filename for Content Entries #3

Open thedodobird2 opened 6 years ago

thedodobird2 commented 6 years ago

At the moment new content entries from Contentful are created with the filename being the same as the entry's ID. This ID can have upper and lowercase letters; this isn't what we want. Especially because of the URLs which are built (Hugo URLs are always all-lowercase).

Requirements for filename:

bzerangue commented 6 years ago

Would it make sense to generate a slug based off the title if there is no current slug field available for each entry name. That way you can keep the names in all lower case?

bzerangue commented 6 years ago

Also, here is a project that was just posted using Hugo but using Node to generate entries as markdown files.

https://github.com/SOGMI/SOGMI.org

thedodobird2 commented 6 years ago

So you're saying I should use the "url" property in hugo's frontmatter which will rewrite the url and keep the name of the markdown file as the ID?