Skip to content

Meta tag, Open Graph, and Twitter sharing metadata problems #203

@daveverwer

Description

@daveverwer

As part of looking over whether we should merge #162, I noticed we have some problems with how we are using our meta tags, including Open Graph and Twitter tags.

When people share URLs from Swift.org, they currently use the site description for the Open Graph and Twitter meta tags, meaning the Mentorship page previews using the site title and site description:

Screenshot 2023-01-14 at 19 03 21@2x

There are several things we could do better:

  • Tweak the conditional meta tags around lines 36 and 49 of base.html, only falling back to the site title and description when absolutely nothing else is available.
  • Attempt to get auto-excerpts working for pages that are not blog posts. I’m not quite sure how they are working for blog posts right now since we don’t use an excerpt_separator. This needs a little investigation.
  • Every page should already have a sensible title, so even without automated excerpts, we should change it so we use the page title in Open Graph and Twitter meta tags.
  • Stretch Goal: We should consider adding custom explicit excerpts for pages that get linked to a lot, like the workgroup pages, getting started, and community pages.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions