Joined September 2017


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><%= "#{Rails.root}/public#{stylesheet_path('amp/application', host: nil)}" %></style>

a la

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

I hope that saves someone the trouble I ran into!

1 Karma
0 Total ProTip Views