How to deploy on Netlify?

Deploying to Netlify is a low friction option for getting a statically generated Nuxt.js site online quickly.

The core of the process leverages the nuxt generate command during deployment to build a static version of your Nuxt.js app into a dist directory. The contents of this directory are then deployed to a production URL.

Getting Started

Press the "New site from Git" button on the Netlify dashboard. Authenticate with your repository host, select a repository to deploy, and continue. You should land on step 3: "Build options, and deploy!"

Configure:

  1. Branch to deploy: master, or which-ever branch you prefer
  2. Build command: npm run generate
  3. Publish directory: dist

Optionally, you can add additional ENV variables via the "Advanced" button. These can be helpful for swapping in alternative API credentials and so on. Netlify also provides a default ENV variables which can be read by your Nuxt.js application at build time.

Click "Deploy site" to immediately trigger a deploy. Your Netlify site will be assigned a random URL and deployed using the nuxt generate command.

Voilà! Your Nuxt.js application is now hosted on Netlify!

Caught a mistake or want to contribute to the documentation? Edit this page on GitHub!