Nuxt.js CMS example
DatoCMS Preview API = content editors happiness
Thanks to Nuxt.js server-rendering capabilities you can easily deploy a clone of your production website that shows real-time previews of the changes you make to any content stored in Dato CMS (text, images, videos). Give it a try, it's magic!
// pages/movie.vue<template><article><h1>{{movie.title}}</h1>Release date: {{movie.releaseDate}}</article></template><script>import { Image, toHead } from "vue-datocms";import { request } from "~/lib/datocms";const query = `{movie(filter: { title: { eq: "Inception" } }) {titlereleaseDateactors {name}}}`;export default {components: {"datocms-image": Image},async asyncData({ params }) {const endpoint = node.env.PREVIEW_MODE ?'https://graphql.datocms.com/preview' :'https://graphql.datocms.com/'return await request(endpoint, query);}};</script>
If your content is always fetched from a single geographical location, there’s no point in building a website with a serverless architecture.
Dato CMS offers your content from a CDN with edges all around the globe, minimizing latency and making your Nuxt.js project as fast as you would expect!
GraphQL Content API
Ask for what you need, get exactly that
Our Content Delivery API is built with GraphQL. That means powerful developer tools, multiple resources in a single request and complete control over the data your website downloads. The perfect solution for a Nuxt.js CMSRead more about our GraphQL API
{}
Nuxt.js images
State of the art for responsive and progressive images
Serving optimized images is incredibly hard, but using our GraphQL Content API and our Vue.js component, you can implement lazy loaded, responsive images in one line of code. Avoid any layout jumping, offer instant previews of images while they load. It’s like magic.
A component-centric CMS, just like Nuxt.js
Thanks to Vue, Nuxt.js makes using components easy right from the get-go, and you should expect the same from your CMS. A component-based approach allows developers to clearly divide work amongst themselves and progress without having to rely on each other every step of the way.
Start your new Nuxt.js project in minutes
Learn from our DatoCMS + Nuxt.js best-practice project. Fully configured and deployed on Netlify or Vercel. Source included.