docbrown/spec/lib
Mike Coutermarsh dd84051ce4 Social Card upgrade - Part 1 (#2090)
* Add HtmlCssToImage for generating images

This will be used by social_previews to convert the templates into images.

Setup a fallback image primarily for local dev, so that this won't cause
errors if authentication is missing.

Caching is setup to use contents of the html/css. So it with
autobust/generate a new image whenever the markup changes.

* Update Article social preview template to not be random

+ Being random breaks caching (since we generate cachekey by a SHA of html content)
+ Use Roboto for when generating via HTML/CSS to Image

* Update Tag social preview template to not be random

+ Make rand deterministic so it doesn't break caching

* Update user social preview template for html/csstoimage

* Update shecoded template to work with both url2png and htmlcsstoimage

* Add ability to respond to .png for social previews controller

When adding .png to the url, these routes will now generate an image and
redirect to it.

This leaves the existing pages as they were, so we're backwards
compatible with all the existing links out in the world.

* Fix merge conflicts

* Remove some duplication

* Improve spec descriptions/read better

* clean up setting template with a ternary
2019-03-22 16:28:02 -04:00
..
acts_as_taggable_on Rubocop Style cops enabled (#2056) 2019-03-15 18:33:54 -04:00
html_css_to_image_spec.rb Social Card upgrade - Part 1 (#2090) 2019-03-22 16:28:02 -04:00