Advanced
Hooks
Modify your content using Nuxt build time hooks
content:file:beforeParse
This hook is called before the content is parsed.
It can be used to modify the raw content from a file
before it is transformed
or modify the transform options.
export default defineNuxtConfig({
hooks: {
'content:file:beforeParse'(ctx) {
// ...
}
}
})
content:file:afterParse
This hook is called after the content is parsed and before it is saved to the database.
export default defineNuxtConfig({
hooks: {
'content:file:afterParse'(ctx) {
// ...
}
}
})