distill icon indicating copy to clipboard operation
distill copied to clipboard

social meta for non-posts (preview image for site)

Open shannonpileggi opened this issue 4 years ago • 3 comments

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. image

Would it be possible to jazz up the look on social media? Just a nice-to-have!

shannonpileggi avatar Jan 18 '21 03:01 shannonpileggi

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

apreshill avatar Jan 18 '21 15:01 apreshill

Super, thanks for the quick reply and a possible solution! I am happy to wait for v1.3, whenever that may be. :)

shannonpileggi avatar Jan 18 '21 20:01 shannonpileggi

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.

HenrikBengtsson avatar Mar 31 '21 22:03 HenrikBengtsson