nometa icon indicating copy to clipboard operation
nometa copied to clipboard

add opengraph features for all website versions

Open BlackYuzia opened this issue 2 years ago • 11 comments

Hi there I just add open graph for website Why this? When someone send you in discord, tg and etc nometa.xyz website, he saw also image, short description and etc before he open website, example: image

Use this website: https://opengraph.dev/ If you want check / generate open graph for other versions of site. I, maybe, will generate this for each version of website, but not sure about that. :eyes:

PS: I test this only on localhost, so check before use it :eyes:

BlackYuzia avatar Oct 21 '22 15:10 BlackYuzia

Is it only for UA? How opengraph work with user locale? Will it display UA version even if end user locale is EN or RU?

leshark avatar Oct 27 '22 09:10 leshark

Is it only for UA?

Currently, yes, you could make it for each language of the website by example. if you would, I could make for ru and, maybe, for en languages.

You could test how it would be displayed by send url on your website.com, website.com/ua etc in discord or in https://opengraph.dev

Will it display UA version even if end user locale is EN or RU?

No. OpenGraph is meta tags, if they not exist in index.html, so open graph shouldn't display.

I test this in local host by some extensions. You would see open graph only if he exist, so currently OpenGraph would be display only on UA version of the website (if you use my version of ua.html).

How opengraph work with user locale?

emm, idk :eyes: I mean, if you send ua.html link, then he see opengraph on ua language, otherwise he saw en / ru etc version of OG (if he exists. If not — then he saw nothing.).

BlackYuzia avatar Oct 27 '22 11:10 BlackYuzia

Just example how it would be (so, index.html is empty and didn't have any OG): image

But, if you paste it on different domain, do not forget change image path, website name etc Otherwise website can't parse properly OpenGraph.

BlackYuzia avatar Oct 27 '22 11:10 BlackYuzia

Hope I didn't destroy anything :eyes:

BlackYuzia avatar Oct 27 '22 15:10 BlackYuzia

Todo List

  • [x] ~~add images for en version (if required);~~
  • [x] ~~change image for uk/ua version (optional)~~
  • [ ] test on production.
  • [x] remove images

Examples

  • EN (current)
    • image
  • RU
    • image
  • UA/UK
    • image
  • UZ
    • image

BlackYuzia avatar Oct 27 '22 15:10 BlackYuzia

Ok, however I am not sure we should include images in preview. They take too much space in chats I think. nometa.xyz link should be short as possible, and also I fear that User will see just preview and do not follow the link :( - which destroys nometa purpose completely

leshark avatar Oct 28 '22 16:10 leshark

They take too much space in chats I think. nometa.xyz link should be short as possible, and also I fear that User will see just preview and do not follow the link :( - which destroys nometa purpose completely

Okey, then should I remove all images and push?

BlackYuzia avatar Oct 28 '22 16:10 BlackYuzia

@leshark I has been delete images. Check pls now.

Anyway, we could add them later if we/you want.

BlackYuzia avatar Oct 28 '22 19:10 BlackYuzia

Hmm, I see a problem User get a link in chat, just nometa.xyz. This is russian speaking chat. Then as default preview in index.html it will generate preview in English, right? The user may think the site is in english and do not proceed to it. What do you think?

leshark avatar Oct 31 '22 12:10 leshark

Yep, seems like a trouble.

Then, this could be fixed by removing opengraph only for English version but I don't sure. Else, users should set language. like: nometa.xyz/ru.html But, that require a few more moves.

Any ideas? :eyes:

BlackYuzia avatar Oct 31 '22 16:10 BlackYuzia

@leshark resolve conflicts pls, idk what should to be

BlackYuzia avatar Nov 04 '22 00:11 BlackYuzia