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

Add "social media" meta tags #897

Closed
idc77 opened this issue Apr 7, 2024 · 4 comments
Closed

Add "social media" meta tags #897

idc77 opened this issue Apr 7, 2024 · 4 comments
Assignees
Labels
feature New feature request
Milestone

Comments

@idc77
Copy link

idc77 commented Apr 7, 2024

Is your feature request related to a problem? Please describe

There are no og: and twitter: meta tags, at least on the / page.
As a result sharing on social media is not very good looking.

Describe the solution you'd like

Add og: and twitter: meta tags to at least the / page.
example

<meta name="og:title" content="Questions and Answers">
<meta name="twitter:title" content="Questions and Answers">

Describe alternatives you've considered

Continue having a poor social media experience

@idc77 idc77 added the feature New feature request label Apr 7, 2024
@prithvidasgupta
Copy link
Contributor

@fenbox I would like to take a look at this. What should be the ideal social media share experience?

@fenbox
Copy link
Member

fenbox commented Apr 26, 2024

@prithvidasgupta I think it should be something like the one below to make it easier to show on social media.

<meta property="og:type" content="website" />
<meta property="og:url" content="{{ canonical url }}" />
<meta property="og:site_name" content="{{ site name }}" />
<meta property="og:image" itemprop="image primaryImageOfPage" content="{{ apple touch icon }}" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:domain" content="{{ site url }}" />
<meta name="twitter:title" property="og:title" itemprop="name" content="{{ post title }}" />
<meta name="twitter:description" property="og:description" itemprop="description" content="{{ description }}" />

Reference:

@prithvidasgupta
Copy link
Contributor

@fenbox The image should be

If question page has a primary image show it 

Else show the logo

Websites like stackoverflow might be doing something like this I guess (not sure?)

@fenbox
Copy link
Member

fenbox commented Apr 27, 2024

If question page has a primary image show it

Else show the logo

@prithvidasgupta Yes, it's really more friendly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
Archived in project
Development

No branches or pull requests

4 participants