jekyll-airtable icon indicating copy to clipboard operation
jekyll-airtable copied to clipboard

Collection generator creates filenames with underscores

Open Rocketpilot opened this issue 6 years ago • 3 comments

When I construct a file name in a template using the slugify filter, phrases become hypenated-like-so, but the plugin creates filenames with underscores instead. Could this be a setting?

Rocketpilot avatar Sep 17 '18 07:09 Rocketpilot

yes, ATM I set it up to use underscores instead by default. I have not used slugify at all so not familiar with it. What configuration do you prefer?

galliani avatar Sep 25 '18 23:09 galliani

Slugify is just a Liquid string filter to allow template designers to turn arbitrary text strings into URL slugs (cf https://jekyllrb.com/docs/liquid/filters/). It's very handy, when, for example, you know in advance that the title of a post is going to be the URL slug and when the slug is not already available as a variable.

It seems to default to hyphens rather than underscores, so that would be the preference.

Cheers!

Rocketpilot avatar Sep 26 '18 00:09 Rocketpilot

I agree with you, I have included this approach in the v0.4.1 of this gem.

galliani avatar Sep 28 '18 03:09 galliani