paint-brush
Next.js Website Boilerplateby@tonyspiro
5,592 reads
5,592 reads

Next.js Website Boilerplate

by Tony SpiroMarch 26th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Next.js website boilerplate built on Next.JS and Cosmic JS. Features include dynamic pages, blog articles, author management, SEO ability, contact form and website search. Sign up for Cosmic JS to install the demo content and deploy this website. The contact form uses mailgun to send an email to your email(s) of choice and to Cosmic JS for easy reference. The website is fully responsive down to mobile w/ Bootstrap frontend with Bootstrap. It is easily managed in Cosmic JS including pages, blogs and contact info.
featured image - Next.js Website Boilerplate
Tony Spiro HackerNoon profile picture

Check out this website boilerplate built on Next.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

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/nextjs-website-boilerplate
cd medical-professional-next-js  
npm install

Import the bucket.json file into your Cosmic JS Bucket. To do this go to Your Bucket > Settings > Import / Export Data. Or install the app via the Next.js Website App page.

Run in production

COSMIC_BUCKET=your-bucket-slug npm start

Go to

http://localhost:3000

Run in development

npm run dev

Go to

http://localhost:5000
.

Configure

Contact email Because Next.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.

env: {
      MAILGUN_KEY :'',
      MAILGUN_DOMAIN : ''
    }