Repository navigation
fix(docs): render the FAQ JSON-LD as a native script tag, and forbid data-typed next/script - #8875
Conversation
…data-typed next/script The FAQ component rendered its FAQPage JSON-LD through next/script with the default afterInteractive strategy, which returns null on the server and injects the tag from a client effect, so the served HTML never carried it. Render a native <script> the way #6763 fixed the other docs JSON-LD blocks; serializeJsonLd already escapes '<'. check:source-text now also fails on a next/script element in apps/** whose type is not JavaScript, naming the native-script fix.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
… types, and scan MDX pages
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
<script type='application/ld+json'>.next/script(defaultafterInteractive) renders nothing on the server and injects from an effect, so the FAQPage structured data never reached the served HTML — same bug and same fix as 025ea4d / 5da48d0check:source-text(already incheck:audits) to fail on anynext/scriptelement inapps/**whose statictypeisn't JavaScript, so this can't ship a fourth time. The message points at the native-script +serializeJsonLdpatternType of Change
Testing
bun run scripts/check-source-text.tspasses on this branch; with the pre-fixfaq.tsxit fails atfaq.tsx:94, and with the pre-025ea4d2bdstructured-data.tsxit fails at its three JSON-LD sitesnext/scriptuses in apps/sim and apps/docs — all load external JS viasrc, none affectedChecklist