SEO
seo/og-absolute-url
Open Graph and social image and URL tags (og:image, og:url, twitter:image) use absolute https URLs.
drobnastatycznefe-seo-metadata
Dlaczego
Link previews in chat apps and social networks are built by crawlers that read only these tags. A relative image path is not resolved, so the shared link appears without an image or with a broken one.
Poprawka
Build the URL from the site's configured origin: new URL('/img/share.png', site).href. Use a 1200 × 630 image or larger, add og:image:alt, and keep these tags in the server-rendered HTML, not added by client script.
Przykłady
<!-- bad -->
<meta property="og:image" content="/img/share.png">
<!-- good -->
<meta property="og:image" content="https://example.com/img/share.png">
<meta property="og:image:alt" content="Acme dashboard showing the weekly report">Źródła
Fakty
- Identyfikator
seo/og-absolute-url- Waga
- drobna
- Sprawdzanie
- statyczne sprawdzane w kodzie źródłowym przez
audit - Dotyczy plików
htmlvuesvelteastrojsx- Uczy jej skill
fe-seo-metadataSEO and metadata- Od wersji
- 0.1.0
Przeczytaj w terminalu
npx github:dawidolko/frontend-skills explain seo/og-absolute-url