Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/content/4.integrations/1.content.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default defineContentConfig({
})
```

::note
Nuxt Content infers collection types from the schema you provide, so the `ogImage` field needs the same [Zod](https://zod.dev) instance your project uses. The module resolves Zod from your project (it's an optional peer dependency), so this works automatically. If you have multiple Zod versions installed and `ogImage` is missing from the generated `ContentCollectionItem` type, pass your instance explicitly with `defineOgImageSchema({ z })`{lang="ts"}.
::

To ensure the tags gets rendered you need to ensure you're using the `defineOgImage()`{lang="ts"} composable with the `ogImage` key.

```vue [[...slug].vue]
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
"sharp": "^0.34.0",
"tailwindcss": "^4.0.0",
"unifont": "^0.7.0",
"unstorage": "^1.15.0"
"unstorage": "^1.15.0",
"zod": ">=3"
},
"peerDependenciesMeta": {
"@resvg/resvg-js": {
Expand Down Expand Up @@ -115,6 +116,9 @@
},
"unifont": {
"optional": true
},
"zod": {
"optional": true
}
},
"dependencies": {
Expand Down Expand Up @@ -149,8 +153,7 @@
"tinyglobby": "catalog:",
"ufo": "catalog:",
"ultrahtml": "catalog:",
"unplugin": "catalog:",
"zod": "catalog:"
"unplugin": "catalog:"
},
"devDependencies": {
"@antfu/eslint-config": "catalog:",
Expand Down Expand Up @@ -219,6 +222,7 @@
"vue": "catalog:",
"vue-tsc": "catalog:",
"wrangler": "catalog:",
"yoga-wasm-web": "catalog:"
"yoga-wasm-web": "catalog:",
"zod": "catalog:"
}
}
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading