fix(seo): declare Twitter card tags with name attributes

X reads twitter:* meta tags from the name attribute, not property, so the card
validator reported twitter:title and twitter:description as missing. Also adds
the og:type tag the root head was never emitting.
This commit is contained in:
Amruth Pillai
2026-08-17 22:19:52 +02:00
parent 36c35c9bd5
commit 1e23a453a0
2 changed files with 11 additions and 9 deletions
+5 -4
View File
@@ -30,10 +30,11 @@ export const createResumeSocialMeta = ({ canonicalUrl, title, description, image
{ property: "og:description", content: description },
{ property: "og:url", content: canonicalUrl },
{ property: "og:image", content: imageUrl },
{ property: "twitter:card", content: "summary_large_image" },
{ property: "twitter:title", content: title },
{ property: "twitter:description", content: description },
{ property: "twitter:image", content: imageUrl },
// X only reads these as `name`, not `property`
{ name: "twitter:card", content: "summary_large_image" },
{ name: "twitter:title", content: title },
{ name: "twitter:description", content: description },
{ name: "twitter:image", content: imageUrl },
];
const serializeJsonLdForScript = (data: JsonLd) =>
+6 -5
View File
@@ -73,12 +73,13 @@ export const Route = createRootRouteWithContext<RouterContext>()({
{ name: "apple-mobile-web-app-capable", content: "yes" },
{ name: "apple-mobile-web-app-title", content: "Reactive Resume" },
{ name: "apple-mobile-web-app-status-bar-style", content: "black-translucent" },
// Twitter Tags
{ property: "twitter:image", content: `${appUrl}/opengraph/banner.jpg` },
{ property: "twitter:card", content: "summary_large_image" },
{ property: "twitter:title", content: title },
{ property: "twitter:description", content: description },
// Twitter Tags — X only reads these as `name`, not `property`
{ name: "twitter:image", content: `${appUrl}/opengraph/banner.jpg` },
{ name: "twitter:card", content: "summary_large_image" },
{ name: "twitter:title", content: title },
{ name: "twitter:description", content: description },
// OpenGraph Tags
{ property: "og:type", content: "website" },
{ property: "og:image", content: `${appUrl}/opengraph/banner.jpg` },
{ property: "og:site_name", content: appName },
{ property: "og:title", content: title },