JSON-LD Explained for Personal Websites

Open original

This article shows how to add JSON-LD markup to personal websites using Schema.org types like WebSite, WebPage, Person, ProfilePage, and SoftwareApplication. It walks through the JSON-LD structure, explains key properties, and provides copy-and-paste examples to improve search previews and SEO.

  • JSON-LD lets crawlers read structured data straight from a script tag without executing JavaScript, using "@context", "@graph", "@id" and "@type" to organize nodes like WebSite, WebPage, Person, and BlogPosting.
  • Linking pages together requires consistent "@id" references (e.g., WebPage's isPartOf pointing to the WebSite node) so the graph stays connected.
  • A Person node with url, name, image, and sameAs links (GitHub, LinkedIn, etc.) is essential for author identity and feeds Google's author metrics and knowledge graph building.
  • Blog posts should use BlogPosting instead of WebPage, adding headline, author, and datePublished fields.

JSON-LD embeds structured data in your site’s <head> so crawlers like Googlebot can parse it without running any JavaScript. You wrap a JSON object in a <script type="application/ld+json"> tag, set "@context" to "https://schema.org", then use "@graph" to list nodes. Each node gets an "@id" (usually your URL plus a hash) and an "@type" (WebSite, WebPage, Person, etc.), plus key/value properties like name, url, description or image. Your site-level JSON-LD starts with a WebSite node: "@id": "https://hawksley.dev/#website", name "Ethan Hawksley", description of the blog, language "en-GB" and links to an ImageObject. On subpages you can slim that down to just type, id, url and name. A WebPage node covers page-specific details, including breadcrumb and isPartOf linking back to the WebSite node. For blog posts you’d swap WebPage for BlogPosting and add headline, author and datePublished. Every page should also include a Person node for author identity. Hawksley’s example lists name fields, jobTitle, nationality, education, an image, and sameAs links to GitHub, LinkedIn, Lobsters and Hacker News. These details feed Google’s author metrics and help other crawlers build a knowledge graph. You can omit lesser properties, but url, name, image and sameAs are must-haves.

Ask about this article