Index of every page on this site: llms.txt
All skills
harlan-zw avatar

/nuxt-schema-org

@995f9a4
Run it yourself

Add, fix, or debug Schema.org JSON-LD in a Nuxt app with the nuxt-schema-org module. Use when a task mentions structured data, rich results, JSON-LD, site identity (Organization, Person, LocalBusiness), useSchemaOrg, defineArticle, defineProduct, defineBreadcrumb, FAQ markup, or the schemaOrg frontmatter key in Nuxt Content. Gives the default graph, verified examples, and the traps that silently drop or corrupt nodes.

  • 2 files
  • 9.5 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/harlan-zw/nuxt-schema-org/nuxt-schema-org

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesnuxt-content.md

≈395 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Nuxt Content

Content v3: add defineSchemaOrgSchema() and a head field to the page collection schema. Without head, the schemaOrg frontmatter key is parsed but never rendered. The Content guide omits head.

// content.config.ts
import { defineCollection, defineContentConfig } from '@nuxt/content'
import { defineSchemaOrgSchema } from 'nuxt-schema-org/content'
import { z } from 'zod'

export default defineContentConfig({
  collections: {
    content: defineCollection({
      type: 'page',
      source: '**/*.md',
      schema: z.object({
        schemaOrg: defineSchemaOrgSchema(),
        head: z.object({
          meta: z.array(z.record(z.string(), z.any())).optional(),
          script: z.array(z.record(z.string(), z.any())).optional(),
        }).optional(),
      }),
    }),
  },
})

If Zod versions clash, pass your instance: defineSchemaOrgSchema({ z }).

Apply the page head in the catch-all page, or nothing renders:

const { data: page } = await useAsyncData(`page-${route.path}`, () => queryCollection('content').path(route.path).first())
useHead(page.value?.head || {})

Frontmatter takes an object, which extends WebPage, or an array, which adds nodes:

---
schemaOrg:
  - "@type": "BlogPosting"
    headline: "How to use our product"
    datePublished: "2023-10-01"
---

asSchemaOrgCollection() is deprecated. Replace it with defineSchemaOrgSchema(). comark-content needs no schema change. Nuxt Content v2 is not supported. Upgrade to Nuxt Content v3.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 995f9a4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated last month
Other metadata
compatibility
Requires Node.js ^22.22.3 || ^24.15.0 || >=26.0.0. Requires Nuxt ^4.6.0 || ^5.0.0. Requires Unhead ^3.4.2.

README badge

README badge for harlan-zw/nuxt-schema-org