org-mode + hugo = ❤

2 minutes (292 Words)
(This post was updated )

Hello world!

I’ve been using org-mode for years and I write personal journals in it from time to time. I also dabble way too much in optimizing how I use it to actually be productive in it, but I digress..

I’ve read about blogging from org-mode and publishing that directly to static sites. I was intrigued, and I somewhat miss blogging, which I haven’t done in probably 10-15 years by now. So here goes, this will be me just trying out syntax and styles.

If this works as easy as it says on the package, that would be pretty cool.

And of course it does! It really is almost ridiculous all the stuff you can do with org-mode.

Lets try a simple table:

Table 1: This is a table
id col1 col2
1 here is
2 some cool
3 table stuff

Evaluations

Since this is all org-mode, we can evaluate whatever we want and include the results, on save.

Javascript

const three = 3;
console.log(`Hello World and ${three}`);

Output:

Hello World and 3

Lisp

(message "Hello from Lisp")

Output:

Hello from Lisp

C

#include <stdio.h>

int main() {
  srand(time(NULL));
  int res = rand() % 500;

  printf("Hello from C %i!", res);
  return 0;
}

Output:

Hello from C 152!

Well blimey

This works really well! How does a link look like?

Image all the things! ATTACH

The images are fetched from my local source (or external) and added on the fly when we compile this, and then added to the correct post folder automatically. Pretty fly.

My current wallpaper wallpaper:

Some house:

Lists

How about a todo list? [2/5]

  • Things
  • I
  • Need
  • To
  • Do

How about tags? test@life

Does not export. But that’s OK - main page title tags apply.

This is great.