bryanbraun / franklin

A static site framework for online books.
141 stars 12 forks source link

href='//....' chokes wkhtmltopdf #2

Closed taqtiqa-mark closed 9 years ago

taqtiqa-mark commented 9 years ago

Example file: source/themes/glide/layouts/layout.erb

<link href='//fonts.googleapis.com/css?family=Bree+Serif&subset=latin,latin-ext' rel='stylesheet' type='text/css'>

results in this error from wkhtmltopdf:

$ bundle exec /redacted/wkhtmltopdf --quiet --page-size A4 --margin-top 0 --margin-right 0 --margin-bottom 0 --margin-left 0 --encoding UTF-8 build/index.html build/index.pdf 
Exit with code 1 due to http error: 1302
bryanbraun commented 9 years ago

Thanks for the contributions. These look good to me, so I'll go ahead and merge.

This update is especially appropriate, given that protocol relative is increasingly being recognized as an antipattern: https://twitter.com/paul_irish/status/588502455530311680. I think I'll add another commit to update these urls to HTTPS, since both the fonts service and jQuery CDN support https requests.