HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.63k stars 75 forks source link

Wrong usage of opengraph metas #190

Closed derek-zhou closed 1 year ago

derek-zhou commented 1 year ago

This is the opengraph metas of a random bear blog page:

<meta property="og:type" content="website">
<meta property="og:site_name" content="Going outside when I am stressed">
<meta property="og:url" content="https://tsk.bearblog.dev/going-outside-when-i-am-stressed">
<meta property="og:title" content="Going outside when I am stressed">

As you can see here, og:site_name is set to the same as og:title. According to: opengraph standard

og:site_name - If your object is part of a larger web site, the name which should be displayed for the overall site. e.g., "IMDb".

So it should be the name of the site, not name of the article. Also, og:type should probably by article, not website. The homepage of a blog can be a website.

HermanMartinus commented 1 year ago

I'll look into this and patch as necessary this week 👍

HermanMartinus commented 1 year ago

Fixed in a534790

derek-zhou commented 1 year ago

Thanks. One more thing, the canonical link from both <link rel="canonical" ...> and og:url are pointing to the url without the trailing slash. However, the feed is pointing to the url with the trailing slash. The url without the trailing slash redirects to with tailing slash, so I think the canonical urls must be the one with trailing slash. Canonical links are no supposed to redirect.

HermanMartinus commented 1 year ago

I've updated the canonical and go urls to respect the slashes 👍