Before you go, check out these stories!

Hackernoon logoNuxt.js Website Boilerplate by@tonyspiro

Nuxt.js Website Boilerplate

Author profile picture

@tonyspiroTony Spiro

CEO & Co-Founder of Cosmic JS

Check out this website boilerplate built on Nuxt.js and Cosmic JS. It satisfies some common website requirements including dynamic pages, blog articles, author management, SEO ability, contact form and website search.



  1. Fully responsive down to mobile w/ Bootstrap frontend
  2. SEO ready
  3. A contact form that sends an email to your email(s) of choice and to Cosmic JS for easy reference
  4. Full-site search functionality
  5. All content is easily managed in Cosmic JS including pages, blog and contact info. Sign up for Cosmic JS to install the demo content and deploy this website.

Get started

git clone
cd nuxtjs-website-boilerplate
npm install

Import the bucket.json file into your Cosmic JS bucket. To do this go to Your Bucket > Settings > Import / Export Data.

Run in production

COSMIC_BUCKET=your-bucket-slug npm start

Go to


Run in development

Create a config/development.js file and match it to config/production.js with your values.

npm run development

Go to


Env vars

As it states on the Nuxt.js website, you will need to set the environment variable HOST to This is already done in the package.json script for you, but you could also set this on the โ€œSet Environment Variablesโ€ section located in Your Bucket > Settings > Deploy Web App.


Because Node.js doesnโ€™t have a mail server, the contact form uses mailgun to send the email. So add the following constants in the config file.


Join Hacker Noon

Create your free account to unlock your custom reading experience.