fix(docs): render the FAQ JSON-LD as a native script tag, and forbid … · simstudioai/sim@e526a91 · GitHub
Skip to content

Commit e526a91

Browse files
authored
fix(docs): render the FAQ JSON-LD as a native script tag, and forbid data-typed next/script (#8875)
* fix(docs): render the FAQ JSON-LD as a native script tag, and forbid 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. * fix(audits): match only the real type prop, fail closed on expression types, and scan MDX pages * fix(audits): recognize default-as next/script imports and skip MDX code examples * fix(audits): keep JSX template literals intact when skipping MDX inline code
1 parent 20101c5 commit e526a91

2 files changed

Lines changed: 104 additions & 18 deletions

File tree

‎apps/docs/components/ui/faq.tsx‎

Lines changed: 1 addition & 2 deletions

‎scripts/check-source-text.ts‎

Lines changed: 103 additions & 16 deletions

0 commit comments

Comments
 (0)