useSchemaOrg()

A reactive way to access and set the robots rule.

Introduction

Type: function useSchemaOrg(nodes: SchemaOrgNode[]): ActiveHeadEntry

Insert Schema.org structured data into your page.

In development mode your Schema.org will be reactive, but once you deploy you'll notice that it's static.

This is because the composable only works in a server-side context by default outside of development for performance reasons. You'll need to use enable the reactive module configuration if you'd like to use this client-side.

Usage

import { useSchemaOrg } from '#imports'

useSchemaOrg([
  defineWebPage({
    name: 'Hello World'
  })
])
Did this page help you?