Digital Ocean has always been great hosting provider and with their tutorials it was easy to get Ghost running on an Ubuntu “droplet” for $5/month. But after seeing a tweet about (free*) Firebase hosting I decided to check it out.
Firebase gives you a simple CLI for creating and deploying projects and they even setup an SSL cert for your domain. Overall it will require less maintenance than my previous setup on DO with Ubuntu, NGINX, Ghost, and Let’s Encrypt.
I did run into an issue verifying ownership of my custom domain through the Firebase console. The docs state that you add a
TXT Record with a google site verification token. I added the
TXT Record through my domain registrar console, but Firebase still failed to verify the domain. I found an old medium post that detailed a deprecated method for domain verification which included a step to add a
CNAME Record that points to your Firebase url (
<project_id>.firebaseapp.com). After adding the
CNAME Record Firebase verified my domain and I was able to remove the record.
I wanted a blog framework that:
- Let me write in markdown
- Supported themes
- Generated static files quickly and easily
Ghost has these features but I didn’t like the web interface for writing content, it doesn’t have a CLI comparable to Hexo, and has more features and complexity than I need. If you’re looking for a static site generator with Markdown support I highly recommend looking at Hexo.
The Hexo and Firebase CLIs make it super easy to generate and deploy a new site:
hexo generate --deploy
firebase init(you will need to sign in on first use)
- Move to
Hosting, select with
SPACEand confirm with
- Create a new project or associate it with an already created one
publicas your public directory
Nto not configure your site as a single-page app
Nto NOT overwrite the
publicdirectory created by Hexo
firebase serve to view your site locally or
firebase deploy to deploy your site :)