A Blog Running on Next.js and Dropbox?

So I just finished setting up this blog on Next.js and a Dropbox folder, and it works surprisingly well. It’s probably stupid to host a simple markdown blog on a node server, but it’s rendered on the server and navigates pretty smooth. Also, having to do literally nothing but to save a markdown file to post is kind of awesome.

I’m caching everything for infinity, and just purge that cache once anything in my blog folder changes. Yeah, webhooks are cool. I know it’s not efficient to just purge all the cache, and it’s definitely something on my list of optimizations. For now it’s surprisingly performant though, the pingdom speed test results are straight :fire:. Well, from Europe at least, since my server is located in Frankfurt.

I’ll probably open-source this thing, until then I have my boilerplate live on Github, which is the one that I’ve used for this blog.

Fun facts

  • It took longer to get emojis to work than the whole Dropbox integration :facewithrolling_eyes:. I ended up converting colon-strings to unicode emojis on the server via emoji-js.
  • I will never trust third-party caching solutions again, at least when I have to manually reset the cache at some point. apicache was a neck-breaker!
  • My webhook security is basically non-existent, but the worst that could happen is a cache purge :shrug:
  • This whole thing, even though it works really well, feels like a huge pile of code held together by duct tape. I have some cleaning up to do I guess!
← Fabian Schultz · July 6, 2017