Closed heitumo closed 1 year ago
Didn't have experience about sharing images, could you please explain it in detail?
Please note that there aren't pages for a single image, they are belonged to the posts or albums.
we could just share the URL of https://hb-theme.hugomods.com/en/blog/2023/03/tutorial/
Found Hugo + photo swipe
this is achievable with Hugo and photoswipe (https://www.liwen.id.au/heg/) and beautifulhugo themes Thank you for the quick response.
The example of liwen, it doesn't display the image I want to share (uses Logo instead). Is that expected?
You could share the image to tweet and see what's happen.
Just did some research, I think it's impossible.
For example, the twitter cards use page's twitter:image
meta tag.
But we won't/unable to generate pages for every single image, so when we're sharing the image, the post's thumbnail instead of the one we want to share will be shown.
EDIT: That makes sense for featured image only, since the featured image will be shown, there will be no ambiguity.
Just did some research, I think it's impossible.
For example, the twitter cards use page's
twitter:image
meta tag.But we won't/unable to generate pages for every single image, so when we're sharing the image, the post's thumbnail instead of the one we want to share will be shown.
EDIT: That makes sense for featured image only, since the featured image will be shown, there will be no ambiguity.
yes, even for Gallery images, we can show featured images? Not sure how it works under the hood comparing to featured image of a post, but an image is better than no image Thank you.
we can show featured images?
Yes, it's implemented already, except the share button, you'll see the featured image when you tweet the post manually.
It may take time to implement, need to modularize this functionality, so that it can be reused in other places (not for image viewer only, the share button could be placed in content panel next or above/below the post content).
I couldn't give ETA, I'll start on it after finishing the docs.
Implemented by #16, see https://hbstack.dev/en/docs/modules/gallery/overview/#album-social-share-image for detail.
hugo mod get github.com/hbstack/bigger-picture@v0.8.0
Preview: https://theme.hbstack.dev/en/gallery/sunrise/
Thanks for your idea.
Maybe we can have options of sharing the image to twitter/wechat/weibo/FB/ins ? Thank you again.