Skip to content

egstad/nuxtlific-graphql

Repository files navigation

Nuxtlific (GraphQL)

Nuxt.js Node Version NPM Version Netlify Status

A JAM-stack framework that's so easy to use, you'll want to slap your grandma (fucking don't though).

Overview

At a high-level, Nuxtlific is a blend of Nuxt.js, Netlify, and Prismic. Nuxt consumes data from Prismic and handles the static-generation of the app. Once pushed to github, Netlify (or a similar service) will continuously deploy the site. It's easy to learn, safe to use, and in most cases it's free. Fucking free!

This particular slice of Nuxtlific uses GraphQL to query Prismic instead of their default rest API. At the time of this writing (Oct. 2019), Prismic's GraphQL feature is in beta but is shipping on all new Prismic repos.

GraphQL pros:

  • Dictating exactly what they need from Prismic means cleaner code and smaller file sizes.
  • Retrieving many resources in a single request is easssssy.
  • GraphQL is strongly-typed, letting you know what' info is available and what shape it's in.

GraphQL cons:

  • Queries always return a HTTP status code of 200. This makes error handling a little tricky.
  • No built-in caching support. Nuxt being a static site, this isn't a problem. But worth mentioning.
  • Complexity. GraphQL comes with a learning curve, but in many cases is worth it.

GraphQL not feel like a good fit? Cool. Try out the regular version of Nuxtlific. It'll do ze trick.

Installation

If you don't already have Prismic or Netlify accounts setup, start there. Both are free and won't take long. Once that is squared away, clone the repo and run the following scripts:

Command Description
npm install Install dependencies
npm start Launch dev server

The documentaion is light, no-nonsense, and easy to read. If something is missing, let me know. Thanks babe.

Credit

The sucker who spent some of his nights and weekends putting this shit together is Jordan Egstad. He's a graphic designer and developer living in Portland, OR.

About

Prismic + Netlify + Nuxt =

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published