Setup Schema.org with your îles app.
yarn add -D @vueuse/schema-org-vite
Start by adding in the îles Schema.org module which handles aliasing and component auto-imports.
import { defineConfig } from 'iles'import { schemaOrgIles } from '@vueuse/schema-org-vite/iles-module'export default defineConfig({ siteUrl: 'https://iles-docs.netlify.app/', modules: [ schemaOrgIles({ // select which types you'd like full: false, }), ],})
Note: Make sure you set your siteUrl
if you haven't already.
Add the vue plugin in your app.ts
file.
import { defineApp } from 'iles'import { installSchemaOrg } from '@vueuse/schema-org-vite/iles-app'export default defineApp({ async enhanceApp(ctx) { installSchemaOrg(ctx, { // any default meta }) },})
See the User Config page for all options you can pass.
Within your layouts/default.vue
file you can add your site-wide schema.
<script lang="ts" setup>import { defineWebPage, defineWebSite, useSchemaOrg } from '@vueuse/schema-org/runtime'useSchemaOrg([ defineWebPage(), defineWebSite({ name: 'test', }),])</script>
Your îles app is now serving basic Schema.org, congrats! 🎉
The next steps are: