Trying to understand the use of slim templates - don't seem to work with components? #275
Replies: 1 comment 2 replies
-
Thanks for asking! So there's a bit of a logical disconnect right now in that Liquid "partials" are called components—as a way of enforcing the idea that global template values don't leak into each component and you pass to pass variables in explictly—but Slim, ERB, etc. don't have that support yet and you have to use the This PR is an attempt to right the ship so that you can build real Ruby components (Slim, ERB, whatever). You could turn your footer to a Slim partial, just bear in mind your layout that renders the partial would also need to be a Slim template. (Again, with the component PR above, the template languages of layouts and components wouldn't need to be the same.) |
Beta Was this translation helpful? Give feedback.
-
Hi, everyone!
I am kicking the tires of bridgetown because I hope it'll replace middlemanapp in my front-end prototypes, and I will still be able to use slim-lang.
With a fresh bridgetown 0.20 installation, I added the slim plugin via
bundle add bridgetown-slim -g bridgetown_plugins
.The site runs without an issue.
I was able to convert
index.md
andposts.md
to slim versions and both worked without an issue.But, if I replace the
src > components > footer.liquid
with
footer.slim
I get an error about a missing liquid template.
Any ideas on how to address this?
Beta Was this translation helpful? Give feedback.
All reactions