Define a JSON-LD Schema in Next.js
📖 Scenario: You are building a simple Next.js website for a local bakery. You want to help search engines understand your site better by adding structured data using JSON-LD schema.
🎯 Goal: Create a JSON-LD schema object describing the bakery and add it to the Next.js page using a <script> tag with the correct type.
📋 What You'll Learn
Create a JavaScript object with bakery details following schema.org's Bakery type
Add a variable for bakery name, address, and opening hours
Convert the object to a JSON string
Insert the JSON-LD inside a
<script type="application/ld+json"> tag in the Next.js page💡 Why This Matters
🌍 Real World
Adding JSON-LD schema helps search engines understand your website content better, improving SEO and rich search results.
💼 Career
Web developers often add structured data to websites to improve visibility and accessibility in search engines.
Progress0 / 4 steps