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.
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.
COSMIC_BUCKET=your-bucket-slug npm start
Go to http://localhost:3000
Run in development
npm run dev
Go to
.http://localhost:5000
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 : ''
}