blinkk / amagaki

A high-performance TypeScript static website generator for building highly-interactive websites. Localization inbuilt. Flexible URLs. Content managed and templates separated.
https://amagaki.dev
MIT License
36 stars 2 forks source link

feat: support appended site name in og:title #166

Closed micjamking closed 2 years ago

micjamking commented 2 years ago

Background:

  1. og:site_name is an optional tag, but recommended (https://ogp.me/)

  2. Social sites will use the <title> tag as a fallback if og:title is missing

  3. IMDB, the example used on the OGP website, includes the site name in both the title tag and og:title on their actual site (but not in the example on ogp.me)

  4. FB doesn't use/show og:site_name in the share dialog (https://developers.facebook.com/support/bugs/1153386624699119/?comment_id=223306658072032)

It seems like the general consensus is the og:site_name is a nice-to-have, but not really used by social sites. General practice is to make the og:title and title consistent, as they both are meant to represent the title of the current page. It's also common SEO practice to include the site name in the page title, but there's no real "gain" from what I've read outside of branding.

jeremydw commented 2 years ago

Go ahead and fix the test for this; see the error using:

npm test -w packages/amagaki-plugin-page-builder