Skip to main content

Nuxt / Vue SSR

Use fetchSchemas in a composable with useHead to inject schemas server-side on every page.

Install

Setup

1. Create the composable

2. Call it in your root layout

Detection

Schemas rendered via useHead on the server appear in the raw HTML source. The InstantSchema dashboard detects them automatically on the next scan.
For auto-detection, add data-instantschema="1" to each rendered script tag:
Without this attribute the dashboard cannot distinguish your schemas from other JSON-LD on the page.