Skip to main content

Contemplative Chronicles

Hugo with emacs org mode

Table of Contents

Why

Exclusively using emacs for writing documentation. I can now write posts directly in org mode.

unicorn

Advantages

  • Never leave emacs.
  • Template with all the hugo parameters
  • Override or customize front matter.

Basic Setup

For my hugo even theme when I create post using new command front matter is already inserted. Below are customization options

Hugo project path

We need to specify hugo project path

#+hugo_base_dir: ../../

This is relative path to my post where top level of hugo site located.

Front matter configuration

#+hugo_front_matter_format: toml

Export path

#+hugo_section: post

TOC

#+hugo_front_matter_format: toc false

Image export hack

I am facing some issue when exporting images as markdown created do not use ! sign before the path. Hence I have to manually add exclaimation mark.