samvincent / jekyll-haml

HAML html converter for Jekyll
MIT License
88 stars 40 forks source link

Passing options to includes #24

Closed tomprats closed 5 years ago

tomprats commented 7 years ago

Great gem! But I'm having a problem I can't seem to figure out.

I'd like to be able to pass a variable to my includes but it interprets everything after haml as the file name.

{% haml comments.haml author="tom" %} => interprets comments.haml author="tom" as the file {% include comments.html author="tom" %} => how it would work with html

I think the cause is related to https://github.com/samvincent/jekyll-haml/blob/master/lib/jekyll-haml/tags/haml_partial.rb#L8 where file really refers to an options string, with the first part being the file.

Let me know if I'm just missing something, or if you'd be interested in a PR. Thanks!

DerLordi commented 6 years ago

I would be interested :) I stumbled on it right now. I also wanted to pass arguments with it. I would love to be able to. Any alternatives?

afaundez commented 6 years ago

Hi,

I've found myself with the same issue I couldn't fix it. It looks that the developer is not looking this, so I created another gem, that uses slightly different approach https://github.com/afaundez/jekyll-haml-markup.

It had a lot of work to do, but I'm willing to maintain it.

tomprats commented 5 years ago

Sounds like a good solution since this gem is dead