SEO

seo/jsonld-valid

Every JSON-LD block is valid JSON with "@context" "https://schema.org" and a schema.org @type.

umiarkowanastatycznefe-seo-metadata

Dlaczego

A trailing comma or a missing quote makes the whole block invalid, and search engines drop it silently: no rich result, no error anywhere. Lighthouse lists structured data only as a manual check, so nothing in the usual tools catches it.

Poprawka

Generate JSON-LD from an object with JSON.stringify (escape < as < when you inject it into HTML), or validate hand-written blocks. Use "@context": "https://schema.org" and a type from Google's current search gallery, describe only what is visible on the page, and test with the Rich Results Test.

Przykłady

<!-- bad: trailing comma -->
<script type="application/ld+json">{ "@context": "https://schema.org", "@type": "Organization", "name": "Acme", }</script>
<!-- good -->
<script type="application/ld+json">{ "@context": "https://schema.org", "@type": "Organization", "name": "Acme", "url": "https://example.com" }</script>

Źródła

Fakty

Identyfikator
seo/jsonld-valid
Waga
umiarkowana
Sprawdzanie
statyczne sprawdzane w kodzie źródłowym przez audit
Dotyczy plików
html vue svelte astro jsx
Uczy jej skill
fe-seo-metadata SEO and metadata
Od wersji
0.1.0

Plik reguły na GitHubie

Przeczytaj w terminalu

npx github:dawidolko/frontend-skills explain seo/jsonld-valid