Blogging Stack with Org Mode
Tags: orgmode, emacs, firebase, gohugo
Published: 2021-10-03 15:55:53

---
title: Blogging Stack with Org Mode
published: true
description: How to use Org Mode to publish a blog post.
tags: orgmode, emacs, firebase, gohugo
canonical_url: https://filipebarroso.com/articles/blogging_with_orgmode/
series: Org Mode
---

![Bookshelves a Photo by Darwin Vegher](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d6q03fm49duu1zvjxprf.jpeg)

_TL;DR_

-   [Org Mode](https://orgmode.org/) - To write the articles, from anywhere
    -   [Ox-hugo](https://github.com/kaushalmodi/ox-hugo) to parse the articles into Hugo
-   [Hugo](https://gohugo.io/) - For the website itself
-   [Firebase](https://firebase.google.com/) - Hosting

---


## Explaining the Stack

I'm lazy, the more hurdles I have to publish a blog post, the harder it is for me to even start writing. To publish something I need to be simple, fast, and easy to write from anywhere, laptop, mobile, or even from handwritten notes.

I use [Org mode](https://en.wikipedia.org/wiki/Org-mode) to write all my notes, professionally or personally. If you are familiar with [Markdown](https://en.wikipedia.org/wiki/Markdown), Org Mode is just another [Markup Language](https://en.wikipedia.org/wiki/Lightweight%5Fmarkup%5Flanguage) but on steroids.

Since I've been using [Emacs](https://www.gnu.org/software/emacs/), more precisely [Doom Emacs](https://github.com/hlissner/doom-emacs), for a while now together with Org Mode to organize my work and life. To use Org Mode to write articles was the most natural transition, even more, after finding [ox-hugo](https://github.com/kaushalmodi/ox-hugo) an Emacs package that parses Org Mode files to Markdown, that can be used in Hugo.


### Why Org Mode

_"Org Mode, your life in plain text"_

Org Mode is a superset of Markdown. First and more important, Org Mode is just like any other text file, it can be opened and edited anywhere, just like Markdown. Org Mode is also like Markdown as in it is human-readable but more importantly, can be extended as you need it, check all default features [here](https://orgmode.org/features.html), you can use it for clocking, tasks management, tables, and much more. Org Mode wins over Markdown since it is extensible as you need it to be, an example is that you can also use it for knowledge keeping, with [Org-Roam](https://www.orgroam.com/), just to mention one example.

You can't do all this Markdown so easily but I understand that is unfair since I am using <span class="underline">Emacs</span>. However, if you install Emacs solely to use Org Mode, you will be well served, no matter your background or for what you use Org Mode for. Check ["Org Mode in the wild"](https://orgmode.org/worg/org-in-the-wild.html) for some examples of uses.

Videos on how to use Org-Mode

-   [Getting Started With Org Mode](https://www.youtube.com/watch?v=SzA2YODtgK4)
-   [Emacs From Scratch #5 - Org Mode Basics](https://youtu.be/VcgjTEa0kU4)


### Why Hugo

The main reason to use GoHugo is that you create articles in Markdown, in which I can parse them from Org Mode through the use of Ox-Hugo package, there are also plenty of resources, tutorials, and themes for Hugo that makes it easy to build any static website for your need.


### Why Firebase

I'll be honest, I picked Firebase given the reason at the beginning of [this blog](https://filipebarroso.com/articles/blogging_with_orgmode/) post, it is because I am lazy. 
Deploying a static website to Firebase is one of the easiest ways to deploy, and since I am really familiar with Firebase, it was my first choice. Nevertheless, Firebase is the one that is more easily replaceable from this Stack, with the Hugo website being static, you can deploy it to [Github Pages](https://pages.github.com/), [Vercel](https://vercel.com/), [Netlify](https://www.netlify.com/) or any other hosting service you prefer.


## Steps to publish a new blog post

In an overview the steps I need to publish a new article are the following:

1.  Write article in Org Mode
2.  Parse the article by running a key binding, in Emacs is called [key chord](https://www.emacswiki.org/emacs/KeyChord), `C-c C-e H H`
3.  Build Hugo website, for it I only have to run the command `$ hugo` or `$ hugo serve` that keeps building the website locally with every new changes
4.  Deploy to Firebase by running `$ firebase deploy`

In the near future. I am going to add a [Makefile](https://en.wikipedia.org/wiki/Make%5F(software)) so I can run the 3rd and 4th steps in one line. After, I might add a simple CI/CD to simplify even further. But the current setup is so simple that, for now, I don't feel the need.


## Conclusion

While the Stack I use for [this blog](https://filipebarroso.com/) is unorthodox it is the one that fits me the best, and in my honest opinion, the fastest starting from writing to publishing also, and no less important is that everything can be versioned through [git](https://git-scm.com/) and saved in a remote repository.

Any part of the Stack can be replaceable, you can ignore all about Org Mode and write your articles directly in Hugo through Markdown, and you can go all crazy and use [Pandoc](https://pandoc.org/) to convert a plethora of file formats to Markdown if you are crazy enough.

About the hosting, since Hugo builds a static website, you can deploy the website anywhere you prefer.

---

Hit me up at [Twitter](https://twitter.com/ABarroso) let me know if you have any questions or if you prefer to feel free to schedule a 1 on 1 on [cal.com](https://cal.com/filipebarroso).

---

This blog post was posted originally at [filipebarroso.com](https://filipebarroso.com/)

_Photo by [Darwin Vegher](https://unsplash.com/@darwiiiin?utm%5Fsource=unsplash&utm%5Fmedium=referral&utm%5Fcontent=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/pile?utm%5Fsource=unsplash&utm%5Fmedium=referral&utm%5Fcontent=creditCopyText)_