Next.js Website Boilerplate

Community Articles
Community Articles Next.js Website Boilerplate

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

TL;DR

Download the Next.js Website Boilerplate 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 for easy reference
4. Full-site search functionality
5. All content is easily managed in Cosmic including pages, blog and contact info. Sign up for Cosmic 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 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

Config 

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.


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


Cosmic has powerful content modeling and delivery tools to help you build apps faster, together. Cosmic lets you manage all your content, data and files and is unopionated as to the format of content you're uploading. The Cosmic Editor allows you to upload rich media such as video, images and
Cosmic lets you build one-to-one as well as one-to-many Object Relationships within your Bucket Dashboard. To help you and your team manage content more seamlessly, you can now see your Connected Objects located on the Object’s Edit page in the Dashboard.
This article walks through an approach to build a web application using Angular and Cosmic to help generate marketing leads for your team.
An application for book lovers to view a list of their favorite books.
Thanks to all who attended our first webinar / AMA last week. There was some great engagement and questions that helped steer the screen-share webinar for users in the Cosmic Community as well as first-time visitors to the system. If you missed it, check out the video and attend our next one.
Blazing fast blog built using React Static that utilizes the power of Cosmic.

Ready to Get Started?

Build personal projects for free. Add your team at unbeatable prices.
Start Now Contact Sales