nanxstats / hugo-renga

A Bootstrap-based minimalist theme for Hugo/blogdown.
https://nanx.me/hugo-renga/
MIT License
23 stars 3 forks source link

No image when sharing on twitter #7

Closed AntoineSoetewey closed 3 years ago

AntoineSoetewey commented 3 years ago

Dear,

I have been using your theme for my blog (www.statsandr.com) for almost a year now.

I am very satisfied with it, but I have one issue regarding twitter.

When I share a blog post on twitter there is no image. See my twitter profile (https://twitter.com/statsandr) or the screenshot attached to see what I mean.

I don't have this issue when sharing the post on Facebook.

Is there anything I can do to fix this issue?

Thanks in advance for your help.

Regards, Antoine

image

nanxstats commented 3 years ago

@AntoineSoetewey If the theme is up-to-date, adding meta_img to the post metadata is the solution. Example here.

meta_img: image/log-book-with-computer-bug.jpg

To preview the look, use the Twitter Card validator after publishing the post and before tweeting the link.

AntoineSoetewey commented 3 years ago

Thanks for your answer @nanxstats !

The theme is up-to-date, and there is a meta_img in the post metadata, as you can see on line 13 of the post here: https://github.com/AntoineSoetewey/statsandr/blob/master/content/blog/2020-10-12-anova-in-r.Rmd#L13

Twitter card validator indeed show no image. Also, I don't know why, but it worked fine in the past as shown by 2 of my tweets in June:

Screenshot 2020-10-13 at 07 53 43

AntoineSoetewey commented 3 years ago

Ok I understand why. In the path of meta_img, there should be no / at the beginning of the path.

Thanks!