How I made my website

2021-3-28

TL;DR I use Directus 9 for my CMS, DroneCI to build the site when I modify the content, and Gridsome as my static site generator. I get the customizability of a CMS and the performance of a static site.


The long answer: This was a bit more complex. The problem lies in the webhooks for Directus. Directus has webhooks which I figured would work great for letting me trigger a new DroneCI build on edits. Little did I know that DroneCI expects an authorization header to be sent along with the POST request. Meanwhile Directus doesn't allow you to customize this.

To solve this, I took my recent work from moving EleutheriaPay to Golang and used it to make MiddleWhere! Its a dead simple app that just uses a .env file to configure an endpoint to proxy to. The best part is if you still want it to be secure, it will accept a token you configure via a querystring.

If you have any questions about this project, feel free to reach out at atri.lahiji@lahijiapps.dev