nometa
nometa copied to clipboard
add opengraph features for all website versions
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:
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:
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?
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.).
Just example how it would be (so, index.html is empty and didn't have any OG):
But, if you paste it on different domain, do not forget change image path, website name etc Otherwise website can't parse properly OpenGraph.
Hope I didn't destroy anything :eyes:
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)
-
-
RU
-
-
UA/UK
-
-
UZ
-
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
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?
@leshark I has been delete images. Check pls now.
Anyway, we could add them later if we/you want.
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?
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:
@leshark resolve conflicts pls, idk what should to be