Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theabbie/mailblog
Inbox powered blog
https://github.com/theabbie/mailblog
blog cms email inbox
Last synced: 2 months ago
JSON representation
Inbox powered blog
- Host: GitHub
- URL: https://github.com/theabbie/mailblog
- Owner: theabbie
- License: mit
- Created: 2021-11-29T05:37:22.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-09T17:27:33.000Z (about 3 years ago)
- Last Synced: 2024-10-16T08:17:08.085Z (4 months ago)
- Topics: blog, cms, email, inbox
- Language: JavaScript
- Homepage: https://mailblog.vercel.app
- Size: 170 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# MailBlog - Inbox powered blog
![mailblog](https://user-images.githubusercontent.com/17960677/145203419-09243272-0e8f-4974-8843-c21361133a00.png)
> MailBlog is a blog that is managed via your Email Inbox and allows you to create and manage your own blog posts by sending an email.
## Email Configuration
For GMail, [Allow Less Secure Apps](https://myaccount.google.com/lesssecureapps), If 2FA is turned on, use [App password](https://support.google.com/accounts/answer/185833)
Follow Similar steps for other E-Mail Providers.
## Environment Variablesput these values in `.env.local` file (in root directory of project) or set these values for the hosting provider,
```env
EMAIL=
PASSWORD=
DB=postgres://username:password@HOSTNAME/DB_NAME
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
```## Blog Metadata
update [components/config.js](components/config.js) file to set metadata for your blog
## Installation
You can host this blog either as a static website, or a dynamic one, but first, initialize the database,
Use Commands from [DB.sql](DB.sql) to create a Database for your blog.
### Static Hosting
```sh
npm run dev
```now go to `localhost:3000/api/refresh` to fetch emails and update your database, Now you can build,
```sh
npm run build
npm run export
```Now deploy the `out` directory to your hosting provider.
The disadvantage is that it only updates blogs while building, thus, you need to repeat this process everytime you want to refresh.
### Dynamic hosting
You can host it as a dynamic website, for example, on [Vercel](https://vercel.com), to do so, simply run,
```sh
vercel --prod
```Or if you want to host it on a VPS,
```sh
npm run build
npm run start
````revalidate` is set to 30 minutes (1800 seconds), you can change that in [components/config.js](components/config.js), it's the duration after which list updates.
You can also trigger fetching emails by visiting `localhost:3000/api/refresh`, which will populate the database with new unread emails.
## Contributing
Thank you for your interest in contributing, If you feel like there's something missing or any new feature can be added, just create a PR and I will see the rest.
## Help
You can contact me on social media, Everything about me can be found [here](https://theabbie.github.io)
## Credits
* [chakra-templates.dev](https://chakra-templates.dev/) For Blog Templates
## Contact
Contact me anywhere, just visit [my portfolio](https://theabbie.github.io)
## License
This project is licensed under MIT License, See [LICENSE](/LICENSE) for more information