👉 Visit the DatoCMS homepage or see What is DatoCMS?
A Nuxt.js module that helps you to work faster with DatoCMS with Nuxt.
This module makes components and composables from vue-datocms easily available in Nuxt.
This module takes care of authentication for you: once the module is installed and properly configured, you're free to use components and composables without worrying about the token. Refer to vue-datocms
documentation for usage.
- Add
@datocms/nuxt-module
dependency to your project
npm install @datocms/nuxt-module # or yarn add @datocms/nuxt-module
- Add
@datocms/nuxt-module
to themodules
section ofnuxt.config.js
export default {
modules: [
// Simple usage
'@datocms/nuxt-module',
// With options
['@datocms/nuxt-module', { /* module options */ }]
]
}
export default {
modules: [
'@datocms/nuxt-module'
],
/* DatoCMS module options */
datocms: {
/* The token is mandatory: you find the token in the settings of your DatoCMS project */
datocmsReadOnlyToken: 'YOUR TOKEN',
}
}
- Type:
String
- Default:
process.env.NUXT_ENV_DATOCMS_API_TOKEN
- Type:
String
- Default:
process.env.NUXT_ENV_DATOCMS_ENVIRONMENT
- Type:
String
- Default:
https://graphql.datocms.com
- Run
npm run dev:prepare
to generate type stubs. - Use
npm run dev
to start playground in development mode.
Copyright (c) - DatoCMS
DatoCMS is the REST & GraphQL Headless CMS for the modern web.
Trusted by over 25,000 enterprise businesses, agency partners, and individuals across the world, DatoCMS users create online content at scale from a central hub and distribute it via API. We ❤️ our developers, content editors and marketers!
Quick links:
- ⚡️ Get started with a free DatoCMS account
- 🔖 Go through the docs
- ⚙️ Get support from us and the community
- 🆕 Stay up to date on new features and fixes on the changelog
Our featured repos:
- datocms/react-datocms: React helper components for images, Structured Text rendering, and more
- datocms/js-rest-api-clients: Node and browser JavaScript clients for updating and administering your content. For frontend fetches, we recommend using our GraphQL Content Delivery API instead.
- datocms/cli: Command-line interface that includes our Contentful importer and Wordpress importer
- datocms/plugins: Example plugins we've made that extend the editor/admin dashboard
- DatoCMS Starters has examples for various Javascript frontend frameworks
Or see all our public repos