nielsenramon / chalk

Chalk is a high quality, completely customizable, performant and 100% free Jekyll blog theme.
http://chalk.nielsenramon.com
MIT License
1.23k stars 442 forks source link

Add back possibility to add custom og-images #125

Closed nielsenramon closed 6 years ago

nielsenramon commented 6 years ago

We used to be able to use local images or urls for og images. I just haven't found a way to support this with jekyll-assets v3:


{% if page.thumb_image %}
  {% if page.thumb_image contains '://' %}
    {% assign thumb_image = page.thumb_image %}
  {% else %}
    {% assign thumb_image = page.thumb_image | asset_path | prepend: site.url %}    
  {% endif %}
{% else %}
  {% assign thumb_image = 'og-image.jpg' | asset_path | prepend: site.url %}  
{% endif %}

If anyone knows how, let me know!