Joined September 2017
·

aseroff

Not sure what the configuration difference that made a difference, but when I followed your steps I ended up with amp stylesheets that were passing validation locally but not when deployed. After a few hours of being dumb and not noticing the validator kept spitting back errors around encoded quotation marks, I figured out the solution for my problem: adding .html_safe to this line here:

<style amp-custom><%= File.read "#{Rails.root}/public#{stylesheet_path('amp/application', host: nil)}" %></style>

a la

<style amp-custom><%= File.read("#{Rails.root}/public#{stylesheetpath('amp/application', host: nil)}").html_safe %></style>

I hope that saves someone the trouble I ran into!

Achievements
1 Karma
0 Total ProTip Views