Unverified Commit 99b26351 authored by Abhishek Mardiya's avatar Abhishek Mardiya Committed by GitHub

docs: clarify native <script> usage for JSON-LD in docs (#90380)

While reviewing the [JSON-LD
documentation](https://nextjs.org/docs/app/guides/json-ld ), I noticed
that seeing `<script>` instead of `<Script>` can easily feel like a typo
> Our current recommendation for JSON-LD is to render structured data as
a <script> tag in your layout.js or page.js components.

This PR adds a short clarification explaining why the native `<script>`
tag is intentionally recommended for JSON-LD. The goal is to reduce
confusion and make the guidance clearer for developers reading the docs.

@icyJoseph

---------
Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
parent a0d293fc
...@@ -83,3 +83,5 @@ const jsonLd: WithContext<Product> = { ...@@ -83,3 +83,5 @@ const jsonLd: WithContext<Product> = {
description: 'Dynamic at the speed of static.', description: 'Dynamic at the speed of static.',
} }
``` ```
> **Good to know**: The `next/script` component is optimized for loading and executing JavaScript. Since JSON-LD is structured data, not executable code, a native `<script>` tag is the right choice here.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment