All Articles

How this blog is served.

I’ll admit the cart came a bit before the horse on this blog. I signed up for my first Digital Ocean Droplet a few days before the first post. My intention was (and still is!) to use it as a playground to run and host hobby projects. What else is there to do for a first project on a new (and currently my only) VM, other than a blog?

Here’s a rundown of what I’m using of what I’m using to serve this blog.

Registrar

The domain (davidnicho.com) is registered on Namecheap. I think it costs $7.99/year with free WhoisGuard protection. Both the domain and WhoisGuard protection are set to renew automatically each year.

Droplet Setup

I’m using the Basic Droplet, which is a shared CPU VM. It should have more than enough capacity to run some no-to-zero traffic projects. If anything ever lands on Reddit or HackerNews, I’ll pretty quickly crash and burn.

The droplet is running Ubuntu 20.04 and is in an NYC datacenter.

Nginx

I’m using Nginx for my webserver on the droplet. Out of the top candidates, Nginx and Apache, I’ve got more experience with the former, so this was an easy choice. So far I’m doing very basic stuff.

Gatsby

I didn’t want to re-invent the wheel in building the blog, so I searched for some starter blog templates. I landed on some nice looking ones using the Gatsby.js framework. Gatsby is new to me, so that’s kind of a fun bonus. I ended up using this template and have made some trivial changes.

Github

The code lives on Github in this repo.

Workflow

I usually write/develop on my local machine, push to github, ssh into the droplet, pull from github, and build.

The Gatsby template I chose uses markdown for the blog post content. Rather than write my blogposts directly in markdown, I write/edit posts in an Emacs Org Mode file and export to markdown when ready.

It’s a bit cludgy right now to clone the repo and copy the exported markdown into the cloned repo. I’d like to write some scripts or tie this into an Emacs function to streamline the workflow. Maybe that’ll be a post of its own one day.