@contentmap/nuxt
@contentmap/nuxt
The Nuxt module for contentmap.
Install
npm i @contentmap/nuxt
Use
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@contentmap/nuxt']
})
Content builds before Nitro resolves modules, rebuilds on change in dev, and the contentmap/generated alias is registered for you.
<script setup lang="ts">
import { posts } from 'contentmap/generated'
</script>
Options
Either through the contentmap config key:
export default defineNuxtConfig({
modules: ['@contentmap/nuxt'],
contentmap: {
config: 'contentmap.config.ts'
}
})
or by passing them in code:
import { contentmapModule } from '@contentmap/nuxt'
export default defineNuxtConfig({
modules: [contentmapModule({ config: 'contentmap.config.ts' })]
})
Every BuilderOptions field is accepted.
Links
MIT
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.2.0 | ^3.0 | MIT | |
| 1.1.0 | ^3.0 | MIT | |
| 1.0.1 | ^3.0 | MIT | |
| 1.0.0 | ^3.0 | MIT | |
| 0.5.2 | ^3.0 | MIT | |
| 0.5.1 | ^3.0 | MIT | |
| 0.5.0 | ^3.0 | MIT | |
| 0.4.1 | ^3.0 | MIT | |
| 0.4.0 | ^3.0 | MIT | |
| 0.3.1 | ^3.0 | MIT | |
| 0.3.0 | ^3.0 | MIT | |
| 0.2.0 | ^3.0 | MIT | |
| 0.1.1 | ^3.0 | MIT | |
| 0.1.0 | ^3.0 | MIT |