avillafiorita / jekyll-datapage_gen

Generate one page per yaml record in Jekyll sites.
369 stars 80 forks source link

jekyll pagemapper #42

Closed KochuraniT closed 5 years ago

KochuraniT commented 6 years ago

i got the error jekyll 3.7.0 | Error: undefined method `gsub' for # on rake build command, and the following is my _config.yml file contents: _config.txt

avillafiorita commented 6 years ago

Hi, the most likely cause is that the field "page" in one of the records in "contentful.spaces.juries.jury" is a hash and not a string.

let me know if this solves your issue!

KochuraniT commented 6 years ago

could you give me an example.where i change to make it working in _config.yml file?

avillafiorita commented 6 years ago

for the plugin to work, each record in contentful.spaces.juries.jury should have a page attribute, which must be a string.

I think you have one record in contentful.spaces.juries.jury which is a Hash. Two solutions:

  1. you choose another field to generate page names from records. You need to change name in _config.yml to the name of the field you want to use.

or

  1. you make sure each record in contentful.spaces.juries.jury has a field page and that all page fields store a string (and not a Hash).

let me know if it works