Open EvanAgee opened 7 years ago
Hi,
I had trouble also with interpolations, I made a gem with a 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.
@EvanAgee did you ever figure this out?
I assume that your string is being escaped from "{{ '/venue' | relative_url }}"
to "{{ '/venue' | relative_url }}"
and being ignored.
In rails it would overcome with simply adding "{{ '/venue' | relative_url }}".html_safe
.
But in jekyll where is no such function for string, put this in _plugins/string_helpers.rb
to obtain it:
class String
def html_safe?
defined?(@html_safe) && @html_safe
end
def html_safe
@html_safe = true
self
end
end
require 'haml/helpers/xss_mods'
module Haml::Helpers
include Haml::Helpers::XssMods
end
Credits for answer going here, look there for details.
Hello! First off thanks for creating this, love it!
The issue I'm having is that when I use liquid to assign a value to a tag attribute it's not being interpolated correctly. For example:
is returning an anchor with an empty href attribute. However if I move that liquid tag into the contents of the anchor it renders correctly.
Any assistance you can provide?