Nuxt.js Website Boilerplate


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.

TL;DR

Download the GitHub repo
Check out the demo.

Features

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 https://github.com/cosmicjs/nuxtjs-website-boilerplate
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 http://localhost:3000 

Run in development 

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

 npm run development 

 Go to http://localhost:5000

Env vars

As it states on the Nuxt.js website, you will need to set the environment variable HOST to 0.0.0.0.  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.


Config 

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.


Was this article helpful?

Thank you! Your input helps us improve our articles and resources. If you have any other questions or comments, please contact support.

You may also like


Grab and save content from any website to your Cosmic JS Bucket.
In this tutorial, I'm going to show you how to create a elegant Recipe App using Vue2, Vuex, Vuetify and Cosmicjs.
This article will point out some of the advantages that a headless CMS offers. Hopefully, your pain point is covered in here or it sparks an idea for a new way of thinking about what you can do with a CMS.
In this short walk-through, I show you how to add localization to your Cosmic JS Object Types.
This application was mainly inspired by Offerup, Letgo, and Craigslist. Like Craigslist, LetGo allows you to buy and sell items locally, which means you don’t have to deal with the hassles of shipping like you would on eBay or Amazon. With 30 million users, it is more popular than OfferUp...
To demonstrate how easy it is to get started with Cosmic JS, we'll utilize the Cosmic JS CLI to quickstart a React Auth App. This app shows implementation of Authentication in ReactJS, NextJS and NodeJS using the Cosmic JS API. This app has all the basic modules like signin, signup, view/edit profi