bridgetownrb/bridgetown-slim

Better understanding of dot (.) based access of Front Matter data

Closed this issue · 1 comments

I'm still new here to Bridgetown, but as a Slim template die-hard I've very eager to move forward with the two together. Thank you for your hard work in putting this gem together. I wanted to share a tripping hazard at the moment, as I have been trying to walk through the Bridgetown documentation while using bridgetown-slim.

It's not very clear that slim templates aren't able to use the dot accessor (such as page.data.title) for some of the Front Matter data. It was only after peeking at the bridgetown-slim-starter repo that I understood that some of these data structures have to be accessed with braces []. Not knowing Bridgetown well, it's really a guessing game for me to know when I need to use braces.

Maybe this is something that also applies to ERB and HAML templates too (I don't know), and would be better documented in the Bridgetown Choose Your Template Engine Documentation.

Thanks again, your work is awesome!

This weird complication about missing dot accessors suddenly went away once I fixed other errors around output bundling and slim template locations. My best guess is that an error in one part of the app caused something to not instantiate correctly.

My apologies for all the noise.