Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add a social media share icon #2154

Merged
merged 4 commits into from
Apr 1, 2024

Conversation

KentarouTakeda
Copy link
Contributor

Hi all,

Thank you for reviewing the Japanese translation.
I tried to post about its publication on social media, but:

X:
twitter-asis

Facebook:
facebook-others-asis
NOTE: In the preview, no image is displayed, but upon actual sharing, the Netlify logo image at the bottom of the page appears, which may not be suitable

Since the image was not displayed, the post ended up looking very plain 😅

Therefore, I propose setting a specific page on the Hexo Official Website as the Open Graph Image and Twitter Summary Card image.

After implementing this pull request, posts on social media will display as follows:

NOTE: These images were generated with OGP Image Simulator and may be slightly different from the actual image.

X:
twitter-tobe

Facebook:
facebook-others-tobe

Previously, only the index page displayed the thumbnail of the landscape theme

Although that behavior was unintentional, to prevent it from being replaced by this pull request, we should explicitly designate the landscape image on the index page as the image for social media.

facebook-index-asis

Thank you for your attention.

Check List

Please read and check followings before submitting a PR.

  • Others (Update, fix, translation, etc...)
    • Languages:
    • en English
    • ru Russian
    • zh-cn simplified Chinese
    • zh-tw traditional Chinese
    • ja Japanese

@github-actions github-actions bot added zh lang: zh-cn && zh-tw infra infrastructure, configuration of this repo en lang: en ko lang: ko pt-br lang: pt-br ru lang: ru th labg: th ja labels Mar 31, 2024
Copy link
Contributor

Theme name validation passed.
Theme thumbnails validation completed.

source/index.md Outdated
@@ -2,6 +2,7 @@
layout: index
description: Hexo is a fast, simple & powerful blog framework powered by Node.js.
subtitle: A fast, simple & powerful blog framework
og_image: /themes/screenshots/landscape.png
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to set the official logo as the og:image for all pages. There's no need to change it page by page. So, we no need to specify og_image in each posts or pages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed with 8956360

@@ -39,6 +39,8 @@
<!-- Open Graph -->
{{ open_graph({
fb_admins: config.fb_admins,
image: url_for(page.og_image or 'icon/og-image-wide.png'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, no need or here. We just add image: url_for('icon/og-image-wide.png') :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed with 8956360

Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :)

@yoshinorin yoshinorin merged commit 3ed08cc into hexojs:master Apr 1, 2024
6 checks passed
@KentarouTakeda KentarouTakeda deleted the add-og-image branch April 1, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
en lang: en infra infrastructure, configuration of this repo ja ko lang: ko pt-br lang: pt-br ru lang: ru th labg: th zh lang: zh-cn && zh-tw
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants