A website template that satisfies some common website requirements including dynamic pages, blog articles, author management, SEO ability, contact form and website search. Contributions welcome!
- Fully responsive down to mobile w/ Bootstrap frontend
- SEO ready
- A contact form that sends an email to your email(s) of choice and to Cosmic JS for easy reference
- Full-site search functionality
- 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.
git clone https://github.com/cosmicjs/nuxtjs-website-boilerplate
cd nuxtjs-website-boilerplate
npm install
# Run in development and serve at localhost:3000
npm run dev
# build for production
npm run build
# Run in production and serve at localhost:3000
COSMIC_BUCKET=your-bucket-slug npm start
Cosmic Functions make it easy to process your contact form securely.
To configure locally, you can hard code your environment variables in nuxt.config.js
:
env: {
SENDGRID_ENDPOINT: process.env.SENDGRID_ENDPOINT, // edit this to your Cosmic Function endpoint
SENDGRID_TO: process.env.SENDGRID_TO // edit this to your email address
}
After you deploy your app follow these steps to configure SendGrid to send the contact form submission:
- Go to Your Bucket > Settings > Functions and add the SendGrid Function.
- Go to Your Bucket > Settings > Web Hosting and click 'Set Environment Variables' tab and save the following variables:
Key | Value |
---|---|
SENDGRID_ENDPOINT | Your SendGrid function endpoint |
SENDGRID_TO | The email(s) that will receive the contact form submission (comma-separated) |