Built-in markdown export

In my previous post I mentioned that most packages made to write content for Hugo in org-mode will not work for me. After digging around a bit in the org documentation, I found a way to at least make my life a little easier by using built-in org exporter to markdown and including this snippet in .org file.

#+OPTIONS: toc:nil
#+begin_export markdown
---
title: "Org Export"
author: ["Szymon Barloga"]
date: Sat, 13 Apr 2024 16:04:37 +0200
tags: ["Org", "Site", "Hugo"]
draft: false
---
#+end_export

Hugo, with my theme, will make its own table of contents.

OPTIONS

Using `#+OPTIONS: toc:nil` will turn of the table of contents. If you need to have TOC in the mardown then `#+TOC: headlines 2` makes the snippet appear on top of the file.

#+OPTIONS: toc:nil
#+begin_export markdown
---
title: "Org Export"
author: ["Szymon Barloga"]
date: Sat, 13 Apr 2024 16:04:37 +0200
tags: ["Org", "Site", "Hugo"]
draft: false
---
#+end_export
#+TOC: headlines 2

Without that, it would appear beneath the table of contents, and some things would probably break because of that.

Evil mode

Also, `:r! date -R` is a useful to remember if someone uses Evil mode.