I am using the jekyll-amazon gem in my Jekyll site successfully, but I would like to modify the output of the detail tag. Right now it does:
def detail(item)
attrs = {
author: item[:author],
publisher: item[:publisher],
date: item[:publication_date] || item[:release_date],
salesrank: item[:salesrank],
description: br2nl(item[:description])
}.map { |k, v| ItemAttribute.new(k, v).to_html }.join("\n")
str = <<-"EOS"
<div class="jk-amazon-item">
#{image(item)}
<div class="jk-amazon-info">
#{title(item)}
#{attrs}
</div>
</div>
EOS
str.to_s
end
but I would like to remove publisher, date, salesrank and description from the list of attributes. Can I override this method, or change the attrs list, and if so, how?
I tried the technique of putting a file in config/initializers containing the override code but that didn't seem to work.
0.3.0 supports custom templates: