I understand MM data has its quirks, as per https://forum.middlemanapp.com/t/can-t-symbolize-keys-of-data-store-hashes/201/2, but I was wondering how I might be able to achieve something like this with the data object:
... which doesn't work.
Reason being, I'm using Contentful to store site-wide variables, meaning every time I want to reference, say, the site title, in my templates I must:
- data.space.global_vars(0).each do | k, v |
Would greatly appreciate it if anyone knows or can point me in the direction on how to "access it's (the data object's) properties in a variety of ways", as the above-linked thread mentions... I can convert the first level of data to a regular hash (
to_h), but am unable (read: don't know how) to recursively convert the whole lot into a regular hash - if indeed one must do this to achieve something like the above.
Any help - much thanks!