Simple Blog
Simple Blog is a web application that works like blog. It is created using NextJS and handles authentication, email verification, handy articles editor and much more.
NOTE: Preview mode is limited and doesn't allow modifying website content
Requirements
- NodeJS
- Any SMTP server (to handle email verification)
- MongoDB (to store data)
Deployment
To use this blog, follow these steps:
- Download source code from GitHub
- Install node modules using
npm i
command inside blog directory - Create file
.env
and fill it with these options
MONGODB_URI=<URL TO YOUR MONGODB>
NEXTAUTH_SECRET=<ANY SECRET HASH (GENERATE IT)>
NEXTAUTH_URL=<BASE LINK TO YOUR WEBSITE>
CREATE_ADMIN=<TRUE IF YOU WANT TO CREATE DEFAULT ADMIN ACCOUNT>
ADMIN_FULL=<FULL NAME OF ADMIN ACCOUNT>
ADMIN_EMAIL=<EMAIL TO ADMIN ACCOUNT>
ADMIN_PASSWORD=<PASSWORD TO ADMIN ACCOUNT>
SMTP_USER=<USER TO SMTP AUTH>
SMTP_PASS=<PASSWORD TO SMTP AUTH>
SMTP_HOST=<HOST OF SMTP>
SMTP_PORT=<PORT OF SMTP>
SMTP_SECURE=<TRUE IF YOU WANT TO USE SECURE SMTP>
SMTP_SENDER=<SMTP SENDER NAME>
RECAPTCHA_SECRET=<RECAPTCHA SECRET KEY>
RECAPTCHA_PUBLIC=<RECAPTCHA PUBLIC KEY>
PREVIEW=<TRUE IF YOU WANT BUILD BLOG IN PREVIEW MODE>
- Edit any other files if you want
- Build project using command
npm run build
- Start server using command
npm run start
Changing verification email template
To change verification email template, use one of these options:
- Login to admin account and go to admin settings (gear button in header). Then you can use editor to change that template. Add link with URL
{LINK}
to add verification URL.
or
- Go to
./data/email.json
and edit it manually