Closed westonganger closed 4 years ago
Hey @westonganger , thank you for reporting this!
Could you please show the contents of your config.rb
file, along with the structure of your directory so we can see what's going on? Any other steps to reproduce would be super helpful as well.
Thank you in advance!
Okay so here is the relevant snippet from my config:
register_data_dirs([
'app/data'
])
I think this code is causing it to fail. See line 100 below.
Apparently the name of the documented data
variable is set by the name of the folder to_sym which in this case would be :'app/data'
You're right, having the directory nested makes it fail indeed. This is a bug, I'll try fix this soon, or feel free to take it on if you'd like 👍
Ok I have created a PR for this. We also need to clearly document that the variable names are set by the data dir name.
Using
data
within any view template results in the following error.Just following the instructions on https://github.com/algolia/frontman/wiki/Data-files