Add Social Previews #215
Closed
DandyLyons
started this conversation in
Feature requests
Replies: 1 comment
-
Hi Daniel, thank you for adding this new feature. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When posting a link to social media sites such as Facebook or Twitter, these sites will automatically generate a preview of the link. Most sites implement this through the Open Graph protocol. Hugo can automatically generate this open graph metadata for us, and we can simply add this metadata to our content by adding simple properties to our YAML headers on our
.md
files. For example by addingimages: ["image.jpg"]
to my blog posts markdown file's YAML header, this image will now be visible in previews when I post that link to Facebook or other sites.I've already implemented this feature on my machine, but per your contributing guidelines, I'm opening this issue. I would like to open a PR to add my implementation. It's a few simple lines added to the head.html template.
Note: Social Previews can also be tested for multiple sites using Social Share Preview. (This works on deployed sites as well as localhost)
Beta Was this translation helpful? Give feedback.
All reactions