distill
distill copied to clipboard
social meta for non-posts (preview image for site)
Hi lovely distill developers! In this brief tweet exchange we noticed and discussed that when sharing distill websites (not specific blog posts) that the link renders on social media without a preview image.
Would it be possible to jazz up the look on social media? Just a nice-to-have!
Hi @shannonpileggi! I agree, looks like @jjallaire added this to the next version milestone.
I wonder if in the meantime metathis would work?
https://github.com/gadenbuie/metathis
Super, thanks for the quick reply and a possible solution! I am happy to wait for v1.3, whenever that may be. :)
I'm not 100% sure that this issue is the same as my feature request but I hope so. I want to be able to specify a default preview centrally in _site.yml
, e.g.
preview: https://rstudio.github.io/distill/images/javascript-d3-preview.png
or alternatively also as:
base_url: https://rstudio.github.io/distill
preview: images/javascript-d3-preview.png
Is that what's proposed here?
BTW/FYI, right now I specify base_url
in _site.yml
and preview
in the yaml header for each page. That get's me halfway there.
However, when doing this I end up with a /./
component in the URL, e.g.
<meta property="og:image" content="https://rstudio.github.io/distill/./images/javascript-d3-preview.png"/>
When specifying base_url
in the yaml header, this doesn't happen, i.e.
<meta property="og:image" content="https://rstudio.github.io/distill/images/javascript-d3-preview.png"/>
This is with distill 1.2.