Bilingual seo social
Skill omaression/company-profile-plugin/skills/bilingual-seo-social
Use when adding SEO and social-sharing to a multilingual site - per-page OpenGraph/Twitter cards, raster share images sized for crawlers, hreflang/canonical alternates, JSON-LD structured data, sitemap/robots, and discovery for a KSA/GCC audience.From its SKILL.md
npx -y skills add omaression/company-profile-plugin --skill bilingual-seo-socialAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.2 KB, as published. Nobody here has run it
Bilingual SEO + social sharing
Overview
Two traps on a multilingual site: Next merges metadata by replacement, not deep merge, so subpages silently inherit the layout's home card unless they set their own; and social crawlers do not render SVG og:images, so an SVG logo fallback gives blank previews. Fix both, build one URL helper, and emit valid structured data.
Per-page OpenGraph (replacement, not merge)
Each top-level metadata field is resolved by replacement. A page that sets only
title still ships the layout's og:title/og:url (the home card). So every
page must spread its own social metadata. Centralize it:
// pageSocialMetadata({ locale, path, title, description?, image?, imageAlt? })
// -> { openGraph, twitter }. Product pages pass their real packaging photo as
// `image` so a shared product link previews the product. Emit og:image
// width/height for the branded card (crawlers lay out before fetching) and
// og:image:alt + twitter:image:alt everywhere.
Share cards must be raster, sized for crawlers
- Generate a branded 1200x630 PNG per locale (the build rendered an HTML card via Playwright from the logo + brand fonts + brand hexes, then quantized with sharp). An SVG fallback renders blank in WhatsApp/Facebook/Twitter.
- Keep it small: WhatsApp silently drops og:images larger than ~300KB. Palette- quantize to tens of KB.
- Set
og:localeper locale (ar_SA/en_US).
One URL helper drives everything
localePath(locale, path) is the single source of truth for canonical, hreflang,
sitemap, og:url, and 404 links (mirrors localePrefix: 'as-needed': default
locale unprefixed, second locale prefixed). localizedAlternates(locale, path)
returns per-page canonical + languages map including x-default ->
default-locale URL. Keep these in sync with the routing config; a drift here
quietly breaks hreflang on every page.
Structured data (JSON-LD), safely
Emit Organization + WebSite + BreadcrumbList in the layout, Product on
detail pages (omit price/regulatory fields the client has not approved). Put a
top-level array of objects in one script via a serializer that escapes <,
>, & so a CMS string containing </script> cannot break out (see
web-security-hardening's jsonLdHtml). Add alternateName (the other locale's
brand name) on Organization + WebSite for bilingual discovery.
sitemap + robots
sitemap.ts: both locales + every product, each URL carrying per-URL hreflang
alternates. robots.ts: disallow /studio and /api, point at the sitemap.
After any URL-structure change (e.g. moving Arabic to the bare domain), resubmit
the sitemap in Search Console and fix any stale /ar/ claims left in docs.
Verify
In a real browser on both locales: each subpage emits its own og:title/url/desc;
all JSON-LD parses valid; the og PNGs serve 200 image/png and are under ~300KB;
canonical + hreflang resolve to the real domain. Validate cards in a sharing
debugger before launch.