A minimalist blog for publishing via emails.
This project offers a simple workflow by using a FastMail mailbox as CMS, and make it a simple static website.
- Send a post to your email account (with JMAP support)
- The app fetches emails from a designated mailbox
- Each post is processed and stored in a
posts.jsonfile - A static site is generated with JS port of the .kit language
- An RSS feed is created at
/rss.xmlfor easy subscription
jmap-blog/
├── .github/workflows/ # GitHub Actions workflow
├── build/ # Generated static site (not tracked in git)
├── src/ # Source code
│ ├── kit/ # Custom templating engine
│ ├── build-site.js # Static site generator
│ ├── fetch-jmap.js # Email fetching module
│ └── generate-rss.js # RSS feed generator
├── templates/ # HTML templates
│ ├── index.kit # Homepage template
│ ├── post.kit # Post template
│ └── styles.kit # CSS styling
├── .env # Environment configuration (not in git)
├── index.js # Main workflow script
├── package.json # Project dependencies
└── posts.json # Poem data storage (not in git)
- Clone this repository
- Install dependencies:
npm install - Copy
.env.defaultfile into.envand fill it
There are several ways to run the application:
npm start- Run the complete workflow (fetch emails → build site → generate RSS)npm run fetch- Fetch new emails and createposts.jsonnpm run build- Build the static site fromposts.jsonnpm run rss- Generate the RSS feed fromposts.json
The project includes a GitHub Actions workflow that:
- Runs on a schedule or can be triggered manually
- Fetches all posts from your mailbox
- Builds the static site
- Generate the RSS feed
- Deploys to GitHub Pages
- Email Settings: Add your JMAP token and Mailbox name to the
.envfile - Site Settings: Configure site URL, title, and email in the
.envfile - Styling: Edit the .kit templates in the
templates/directory - Schedule: Modify the cron schedule in
.github/workflows/emails-to-deploy.yml
- Node.js 20+
- An email account with JMAP support
- A GitHub repository (for GitHub Pages deployment only)
MIT License