nodejs / nodejs.org

The Node.js® Website

Home Page:https://nodejs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

odd og image

mcollina opened this issue · comments

is the following OG image correct? I think we should do something better than undefined:

IMG_0643

on nodejs.org/en og:image link is https://nodejs.org/en/next-data/og?title=Run%20JavaScript%20Everywhere&type=announcement and It's work correctly. idk why on linkedin it's undefined.

CC @bmuenzenmeyer

Yes. As I mentioned a couple places this is unexpected.

I haven't had time to debug it yet. All testing done prior was working. This link shared is missing the locale. I wonder if that is part of it

this is going to be fun to debug without deploying things in test and spamming LinkedIn / social media

as-is

site result
https://v1.opengraph.11ty.dev/https%3A%2F%2Fnodejs.org image
https://www.opengraph.xyz/url/https%3A%2F%2Fnodejs.org image
https://developers.facebook.com/tools/debug/?q=nodejs.org image

we have a re-creation!

that means we can use facebook's preview for future fixes

the site states:

og:image | https://nodejs.org/en/next-data/og?title=undefined&type=announcement

which isn't really a surprise. so why do the others work...

we are encoding the string https://nodejs.org/en/next-data/og?title=Run%20JavaScript%20Everywhere&type=announcement

is this a home page locale thing or any other URL?

https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fnodejs.org%2Fen%2Fblog%2Frelease%2Fv21.7.1 works

also worth noting, the fact that one site says linkedin works but it clearly doesnt is an indicator of implementation-side problems of the platforms. we might not be able to do much TBH

I was almost thinking the update was regarding undefined/null types "loll🙏🏻"

i tested blog announcements so it's also undefined.
release also throw undefined
vulnerabilit also throw undefined

fixed in above PR - the previous logic was relying only on page frontmatter title. pages without that key or not markdown were therefore broken. the first usecase of this was blog posts, which always have title, so these other programmatically created pages were not as heavily tested