Index of every page on this site: llms.txt

Setting up your site identity connects your Schema.org to Google's Knowledge Graph, enabling your logo and social links to appear in search results.

Where does this code go?

Put a stable site-wide identity in nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
  schemaOrg: {
    identity: {
      type: 'Organization',
      name: 'Acme',
      logo: '/logo.png',
      url: 'https://example.com',
    },
  },
})

Use app.vue or a page component only when the identity depends on runtime data. Static config is easier to validate and is enough for most sites.

Providing an identity links Default Schema.org to your site author. Organization or LocalBusiness nodes can trigger Rich Results.

Which identity type should I use?

Choose based on your site type:

Only 'Person', 'Organization', and 'LocalBusiness' are valid string values for the identity config option. Sub-types like OnlineStore must be specified using the composable syntax with '@type' (see below).

When should I use Person?

Use Person when your website is about a person, personal brand, or personal blog.

Example: harlanzw.com, antfu.me

import { definePerson } from 'nuxt-schema-org/schema'

export default defineNuxtConfig({
  schemaOrg: {
    identity: definePerson({
      name: 'Harlan Wilton',

      // Profile Information, if applicable
      image: '/profile-photo.jpg',
      description: 'Software engineer and open-source contributor',

      url: 'harlanzw.com',
      sameAs: [
        'https://twitter.com/harlan_zw',
        'https://github.com/harlan-zw'
      ],
    })
  }
})

When should I use Organization?

Use Organization for companies, brands, non-profits, or communities. Also use it as a fallback when other options don't fit.

import { defineOrganization } from 'nuxt-schema-org/schema'

export default defineNuxtConfig({
  schemaOrg: {
    identity: defineOrganization({
      // Basic Information
      name: 'TechCorp Solutions',
      logo: '/logo.png',
    })
  }
})

When should I use LocalBusiness?

Use LocalBusiness for local businesses, stores, restaurants, or services with a physical address.

Some examples of LocalBusiness

Google recommends using the most specific type of LocalBusiness that fits your business, check the list of subtypes to find the most appropriate.

In nuxt.config.ts, set type: 'LocalBusiness' and put the subtype in '@type'. The identity then renders as ["Organization", "LocalBusiness", "Restaurant"].

Do not wrap a LocalBusiness config identity in defineLocalBusiness(). It renders as ["Organization", "Restaurant"], and the LocalBusiness type is lost.

If you need to use dynamic data, use the defineLocalBusiness function within your app.vue (see the Dynamic tab).

export default defineNuxtConfig({
  schemaOrg: {
    identity: {
      'type': 'LocalBusiness',
      '@type': 'Restaurant', // Choose from https://schema.org/LocalBusiness#subtypes

      // Basic Information (Required)
      'name': 'The Coastal Kitchen',
      'description': 'Farm-to-table restaurant specializing in sustainable seafood and seasonal ingredients',
      'url': 'https://thecoastalkitchen.com',

      // Location (Required)
      'address': {
        streetAddress: '742 Oceanview Boulevard, Suite 100',
        addressLocality: 'Santa Cruz',
        addressRegion: 'CA',
        postalCode: '95060',
        addressCountry: 'US'
      },
    },
  }
})

When should I use OnlineStore?

Use OnlineStore for ecommerce sites selling products online. OnlineStore is not a valid string value for the identity config option; you must use the defineOrganization composable and set '@type': ['Organization', 'Store', 'OnlineStore'] explicitly.

import { defineOrganization } from 'nuxt-schema-org/schema'

export default defineNuxtConfig({
  schemaOrg: {
    identity: defineOrganization({
      '@type': ['Organization', 'Store', 'OnlineStore'],

      // Basic Information
      'name': 'ModernHome',
      'logo': '/logo.png',
    }),
  }
})
Verify your identity - Check your Organization or Person schema is correct with our Schema.org Validator.

Recipes

It's recommended to provide as much information about your identity as possible, here are some recipes.

Social Media Profiles

// example for nuxt.com
export default defineNuxtConfig({
  schemaOrg: {
    identity: {
      type: 'Organization',
      name: 'NuxtJS',
      logo: '/logo.png', // will resolve to canonical URL + /logo.png
      sameAs: [
        'https://x.com/nuxt_js',
        'https://www.linkedin.com/showcase/nuxt-framework/',
        'https://github.com/nuxt'
      ]
    }
  }
})
Was this page helpful?