Publishing a blog on Github with Org and Hugo

If you ever thought to yourself, “Gee, Emacs Org mode is a great outlining and authoring tool, and I wish there were a powerful and simple way use it to publish static websites on github or in S3 buckets, I wish my blog could look as slick ast” your’re in luck, All but the simple part. Here are some of the references I used.

Post 19 of #100DaysToOffload

Potential ox-hugo sites to copy

The Art Of Not Asking Why

I started by looking for sample web sites to copy by perusing the sites on this list

I found the following


Josh has been great in answering the odd question. His blog is interesting too !!! He accepts paypal…

General Info on Hugo, Ox-Hugo and github pages

Then I did some reading (this is where the not simple part comes in) on the following sites

hugo getting started
hosting a blog on github pages
github pages
HOWTO with Hugo and github pages
Org mode hugo exporter
  • I’ll probably go here, but it seems like a bit much to start…
  • Maybe learn the un-automated way first?
About Hugo
About blogging with Hugo

The results

You’re looking at the results:, this and other posts. It took a couple deep dives to understand it, but I think I more-or-less have it, and it is a very seamless integration wtih Org-Mode, which for some of us closes the deal even if there is pain involved

Bonus: Twitter cards

And for bonus points I did reading on how to add twitter card support to ox-hugo bog posts, e.g., so you can write your post and have twitter or other sites (such as Mastadon) that understand the format pull the title, intro and possibly an image to post in the web sit.

Twitter Cards: HOWTO, the short story

Short version: if you drop twitter_cards.html in layouts/partials/ of your blog, you then just write your blog, publish it, and past the URL into the to make sure it’s going to work when posted

Twitter Cards: More than you ever wanted to know, the long story.

Twitter Cards
Twitter cards in ox-hugo
Twitter cards in Hugo
Twitter cards partials for Hugo
Ttitter card, ox-hugo discussion
about hugo partials

How to publish: files, settings, process

And, finally the gory details of actually publishing.

These are raw/WIP notes, but mostly right. They actually publish this blog.

Important Files and Directories

The one file to rule them all o This is the blog. All articles live in this one file as separate org trees. This is the “source”.
The root of my blog o This is the root_source for the blog. It gets pushed to (fetch)
Where local content (markdown) goes, e.g. content/posts/
Where the content to publish (html) goes,

Settings and Organization


In the .org file that is the blog, set EXPORT_HUGO_SECTION to be “Blog” (or in whichever section you want posts to land, default is “posts”)

This is inherited lower level headers in org so

** Blog

covers things in

* Content
** Blog
*** Work Stuff
*** PUBLISHED Choosy Programmers Choose GIF :Wilhite:CompuServe:GIF:History:Computers:Emacs:Programming:




make sure post is live, looks right

Add and push the source

        cd ..
        git status .
        git add [new files]
        git commit -m"name of new post"


“I mean, why not just use or Wordpress”? Been there done that.

Companies come and go. I ought to know. I started my career working at CompuServe. The forums where apparently finally deleted on 2017. History was lost.

There are issues of control. There are the issues of using tools I like, not the GUI or “download my app” du jour with tracking, ads, monetization, bloat and more.