Setup Identity
Introduction
Providing an identify will be link the Default Schema.org to the author of the site
and for
Choosing an Identity
Your choices fore identity are:
Person
A
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'
],
})
}
})
import { definePerson } from 'nuxt-schema-org/schema'
export default defineNuxtConfig({
schemaOrg: {
identity: definePerson({
// Basic Information, if applicable
name: 'Dr. Sarah Chen',
givenName: 'Sarah',
familyName: 'Chen',
additionalName: 'J.', // middle name or other additional names
alternateName: 'Sarah J. Chen',
// Profile Information, if applicable
image: '/profile-photo.jpg',
description: 'AI researcher and technical author specializing in machine learning and neural networks',
jobTitle: 'Principal AI Researcher',
// Contact & Social, if applicable
email: '[email protected]',
url: 'https://sarahchen.dev',
sameAs: [
'https://twitter.com/sarahchen',
'https://github.com/sarahchen',
'https://linkedin.com/in/sarahchen',
'https://scholar.google.com/citations?user=sarahchen'
],
// Professional Details, if applicable
worksFor: {
'@type': 'Organization',
'name': 'Tech Research Labs',
'url': 'https://techresearchlabs.com'
},
})
}
})
Organization
The
import { defineOrganization } from 'nuxt-schema-org/schema'
export default defineNuxtConfig({
schemaOrg: {
identity: defineOrganization({
// Basic Information
name: 'TechCorp Solutions',
logo: '/logo.png',
})
}
})
import { defineOrganization } from 'nuxt-schema-org/schema'
export default defineNuxtConfig({
schemaOrg: {
identity: defineOrganization({
// Basic Information
name: 'TechCorp Solutions',
alternateName: 'TechCorp',
description: 'Leading provider of enterprise software solutions and cloud services',
url: 'https://techcorp.com',
logo: '/logo.png',
// Address Information, if applicable
address: {
'@type': 'PostalAddress',
'streetAddress': '100 Innovation Drive, Suite 400',
'addressLocality': 'Silicon Valley',
'addressRegion': 'CA',
'postalCode': '94025',
'addressCountry': 'US'
},
// Contact Information, if applicable
email: '[email protected]',
telephone: '+1-650-555-0123',
contactPoint: {
'@type': 'ContactPoint',
'telephone': '+1-650-555-0124',
'email': '[email protected]'
},
// Business Details, if applicable
foundingDate: '2010-01-15',
numberOfEmployees: {
'@type': 'QuantitativeValue',
'minValue': 500,
'maxValue': 999
},
// Social and External Links, if applicable
sameAs: [
'https://twitter.com/techcorp',
'https://www.linkedin.com/company/techcorp',
'https://www.facebook.com/techcorp'
],
// Business Identifiers, if applicable
legalName: 'TechCorp Solutions Inc.',
taxID: '12-3456789',
vatID: 'GB123456789',
duns: '12-345-6789',
iso6523Code: '0060:123456789',
naics: '541512',
// Return Policy, if applicable
hasMerchantReturnPolicy: {
'@type': 'MerchantReturnPolicy',
'name': 'Standard Return Policy',
'inStoreReturnsOffered': true,
'returnPolicyCategory': 'https://schema.org/MerchantReturnFiniteReturnWindow',
'returnPolicyCountry': 'US',
'returnWindow': {
'@type': 'BusinessDaysSpecification',
'numberOfDays': 30
}
}
})
}
})
LocalBusiness
The
Some examples of
Google recommends using the most specific type of
If you need to use dynamic data, you can use the
import { defineLocalBusiness } from 'nuxt-schema-org/schema'
export default defineNuxtConfig({
schemaOrg: {
identity: defineLocalBusiness({
'@type': '...', // 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'
},
}),
}
})
import { defineLocalBusiness } from 'nuxt-schema-org/schema'
export default defineNuxtConfig({
schemaOrg: {
identity: defineLocalBusiness({
'@type': '...', // 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'
},
// Precise Geographic Location, if applicable
'geo': {
'@type': 'GeoCoordinates',
'latitude': '36.9741',
'longitude': '-122.0308'
},
// Contact Information, if applicable
'telephone': '+1-831-555-0123',
'email': '[email protected]',
// Hours of Operation, if applicable
'openingHoursSpecification': [
{
dayOfWeek: ['Monday', 'Tuesday', 'Wednesday', 'Thursday'],
opens: '11:30:00',
closes: '22:00:00'
},
{
dayOfWeek: ['Friday', 'Saturday'],
opens: '11:30:00',
closes: '23:00:00'
},
{
dayOfWeek: 'Sunday',
opens: '10:00:00', // Sunday Brunch
closes: '21:00:00'
}
],
// Business Details, if applicable
'priceRange': '$$$', // $, $$, $$$, or $$$$
'servesCuisine': [
'Seafood',
'California',
'Farm-to-table'
],
// Menu (for restaurants)
'menu': 'https://thecoastalkitchen.com/menu',
// Images, if applicable
'image': [
'https://thecoastalkitchen.com/images/storefront.jpg',
'https://thecoastalkitchen.com/images/interior.jpg',
'https://thecoastalkitchen.com/images/food.jpg'
],
'logo': '/logo.png',
// Payment Options, if applicable
'paymentAccepted': [
'Cash',
'Credit Card',
'Cryptocurrency'
],
'currenciesAccepted': 'USD',
// Additional Business Details, if applicable
'isAccessibleForDisabled': true,
'amenityFeature': [
{
'@type': 'LocationFeatureSpecification',
'name': 'Parking',
'value': true
},
{
'@type': 'LocationFeatureSpecification',
'name': 'Wheelchair Accessible',
'value': true
},
{
'@type': 'LocationFeatureSpecification',
'name': 'Outdoor Seating',
'value': true
}
],
// Social Links, if applicable
'sameAs': [
'https://www.facebook.com/coastalkitchen',
'https://instagram.com/thecoastalkitchen',
'https://twitter.com/coastalkitchen'
]
}),
}
})
<script lang="ts" setup>
// app.vue
import { defineLocalBusiness, useSchemaOrg } from '#imports'
const reviews = useFetch('/api/reviews')
useSchemaOrg([
defineLocalBusiness({
// ...
reviews: reviews.data.value
})
])
</script>
OnlineStore
The
import { defineOrganization } from 'nuxt-schema-org/schema'
export default defineNuxtConfig({
schemaOrg: {
identity: defineOrganization({
'@type': ['Organization', 'Store', 'OnlineStore'],
// Basic Information
'name': 'ModernHome',
'logo': '/logo.png',
}),
}
})
import { defineOrganization } from 'nuxt-schema-org/schema'
export default defineNuxtConfig({
schemaOrg: {
identity: defineOrganization({
'@type': ['Organization', 'Store', 'OnlineStore'],
// Basic Information
'name': 'ModernHome',
'alternateName': 'Modern Home Decor',
'description': 'Contemporary furniture and home decor with worldwide shipping. Specializing in minimalist Scandinavian design.',
'url': 'https://modernhome.com',
'logo': '/logo.png',
// Contact Information, if applicable
'email': '[email protected]',
'telephone': '+1-888-555-0123',
'contactPoint': [
{
'@type': 'ContactPoint',
'contactType': 'customer service',
'telephone': '+1-888-555-0123',
'email': '[email protected]',
'availableLanguage': ['English', 'Spanish'],
'hoursAvailable': {
'@type': 'OpeningHoursSpecification',
'dayOfWeek': ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
'opens': '09:00:00',
'closes': '18:00:00'
}
},
{
'@type': 'ContactPoint',
'contactType': 'sales',
'telephone': '+1-888-555-0124',
'email': '[email protected]'
}
],
// Business Details, if applicable
'foundingDate': '2015-01-01',
'numberOfEmployees': {
'@type': 'QuantitativeValue',
'value': 85
},
// Legal Information, if applicable
'legalName': 'ModernHome Inc.',
'taxID': '47-1234567',
'vatID': 'EU123456789',
// Business Address (headquarters/returns), if applicable
'address': {
'@type': 'PostalAddress',
'streetAddress': '100 Commerce Way, Suite 300',
'addressLocality': 'Portland',
'addressRegion': 'OR',
'postalCode': '97201',
'addressCountry': 'US'
},
// Return Policy, if applicable
'hasMerchantReturnPolicy': {
'@type': 'MerchantReturnPolicy',
'name': 'Standard Return Policy',
'inStoreReturnsOffered': false,
'merchantReturnDays': '30',
'returnPolicyCategory': 'https://schema.org/MerchantReturnFiniteReturnWindow',
'returnMethod': ['ReturnByMail'],
'returnFees': 'https://schema.org/FreeReturn',
'returnPolicyCountry': {
'@type': 'Country',
'name': ['US', 'CA', 'GB', 'AU', 'NZ']
}
},
// Shipping Policy, if applicable
'shippingDetails': {
'@type': 'OfferShippingDetails',
'shippingRate': {
'@type': 'MonetaryAmount',
'value': '0',
'currency': 'USD'
},
'shippingDestination': {
'@type': 'DefinedRegion',
'addressCountry': ['US', 'CA', 'GB', 'AU', 'NZ']
},
'deliveryTime': {
'@type': 'ShippingDeliveryTime',
'handlingTime': {
'@type': 'QuantitativeValue',
'minValue': 1,
'maxValue': 2,
'unitCode': 'DAY'
},
'transitTime': {
'@type': 'QuantitativeValue',
'minValue': 3,
'maxValue': 7,
'unitCode': 'DAY'
}
}
},
// Payment Methods, if applicable
'paymentAccepted': [
'Credit Card',
'PayPal',
'Apple Pay',
'Google Pay',
'Shop Pay'
],
'currenciesAccepted': ['USD', 'EUR', 'GBP', 'CAD', 'AUD'],
// Social Media & External Links, if applicable
'sameAs': [
'https://facebook.com/modernhome',
'https://instagram.com/modernhome',
'https://pinterest.com/modernhome',
'https://twitter.com/modernhome'
],
// Trust Indicators, if applicable
'hasCredential': [
{
'@type': 'EducationalOccupationalCredential',
'credentialCategory': 'BBB Rating A+',
'url': 'https://www.bbb.org/modernhome'
},
{
'@type': 'EducationalOccupationalCredential',
'credentialCategory': 'Certified B Corporation',
'url': 'https://www.bcorporation.net/modernhome'
}
],
// Aggregate Ratings, if applicable
'aggregateRating': {
'@type': 'AggregateRating',
'ratingValue': '4.8',
'reviewCount': '12459',
'bestRating': '5',
'worstRating': '1'
},
// Customer Service Features, if applicable
'hasOfferCatalog': {
'@type': 'OfferCatalog',
'name': 'ModernHome Product Catalog',
'url': 'https://modernhome.com/products'
},
// Additional Business Properties, if applicable
'slogan': 'Design for Modern Living',
'keywords': [
'modern furniture',
'scandinavian design',
'home decor',
'minimalist furniture',
'contemporary home'
],
// Business Hours (Customer Service), if applicable
'openingHoursSpecification': [
{
'@type': 'OpeningHoursSpecification',
'dayOfWeek': ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
'opens': '09:00:00',
'closes': '18:00:00'
}
]
}),
}
})
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'
]
}
}
})
// example for harlanzw.com
export default defineNuxtConfig({
schemaOrg: {
identity: {
type: 'Person',
name: 'Harlan Wilton',
image: '/profile.jpg',
sameAs: [
'https://x.com/harlan_zw',
'https://github.com/harlan-zw',
'https://harlanzw.com'
]
}
}
})
// local coffee shop
export default defineNuxtConfig({
schemaOrg: {
identity: {
type: 'LocalBusiness',
name: 'Coffee Shop',
logo: '/logo.png', // will resolve to canonical URL + /logo.png
sameAs: [
'https://x.com/coffee_shop',
'https://www.facebook.com/coffee_shop',
'https://www.yelp.com/coffee_shop'
]
}
}
})