If your content is always fetched from a single geographical location, there’s no point in building a website with a serverless architecture.
DatoCMS offers your content from a CDN with edges all around the globe, minimizing latency.
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.
{}
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.
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 (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>
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.
Learn from our best-practice project. Fully configured and deployed on Netlify or Vercel. Source included.