Hugo blog org-capture-templates

Blogging with org-mode I do almost all my note-taking in Emacs org-mode, so naturally I also prefer to write my blog posts in it. As for my ox-hugo blogging flow, I use the less preferred method: one org file per post, the consequence is I cannot just copy-paste the org capture setup provided by the doc site. I also setup my posts in a subdirectory beneath the HUGO_BASE_DIR: 1 tree -n .. Code Snippet 1: my content directory 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 .. ├── about │ └── about.org ├── archives.org ├── emacs-avy │ ├── avy.gif │ └── emacs-avy.org ├── emacs-builtin-use-package │ ├── emacs-builtin-use-package.org │ ├── prefix-key.png │ └── which-key-mode.png ├── emacs-evil │ └── emacs-evil.org ├── emacs-general │ └── emacs-general.org ├── emacs-sane-defaults │ ├── default-emacs.png │ ├── emacs-after.png │ ├── emacs-dired.png │ ├── emacs-eshell.png │ ├── emacs-sane-defaults.org │ └── emacs-tetris.png ├── emacs-shell │ ├── emacs-shell.org │ ├── eshell-command-form.png │ ├── eshell-elisp-form.png │ └── eshell.png ├── emacs-version-control │ ├── emacs-magit-status.png │ └── emacs-version-control.org ├── emacs-vertico │ ├── consult-buffer.png │ ├── consult-flymake.png │ ├── consult-outline.png │ ├── consult-yank-pop.png │ ├── corfu-completion.png │ ├── emacs-vertico.org │ ├── emacs-vertico.png │ ├── emacs-without-vertico.png │ ├── marginalia-describe-variable.png │ ├── marginalia-files.png │ ├── marginalia-find-file-with-icons.png │ ├── nerd-icons-corfu.png │ ├── orderless-default.png │ ├── vertico-buffer-mode.png │ ├── vertico-flat-mode.png │ ├── vertico-grid-mode.png │ ├── vertico-indexed-mode.png │ ├── vertico-quick.png │ └── vertico-reverse-mode.png ├── github-action-hugo-emacs │ ├── action-secrets-and-variables.png │ ├── deploy-github.png │ └── github-action-hugo-emacs.org ├── hugo-blogging-org-capture-templates │ └── hugo-blogging-org-capture-templates.org ├── hyprland │ ├── hyprland.org │ └── hyprland.png ├── notmuch-mail-emacs │ ├── full.png │ └── notmuch-mail-emacs.org ├── search.org └── theming-emacs ├── default-emacs.png ├── emacs-doom-theme-modeline-and-dashboard.png ├── emacs-wombat.png └── theming-emacs.org 15 directories, 53 files Custom org-capture-templates First off, org-capture-templates is just like its name; it is a template for creation of new entries. It is used by org-mode, which is a killer feature of Emacs. Initially it was design to capture notes with little interruption1. But since it was all Emacs Lisp, we can modify it with ease. ...

March 3, 2024 · (updated April 23, 2025) · 10 min · 2101 words · Kristian Alexander P

Github Action for hugo static site using Emacs

About This site is build with Hugo which is a static site generator using markdown. The usual way of doing github action with hugo is using the actions-hugo workflow. Since I’m using org-mode for literally everything, it’s only natural that I also use it for blogging. Figure 1: Deployment to github pages Setup Create a script for exporting org-files to markdown We need to be able to export the org-mode files into markdown format. Depending on how the files are organized, we need to have a function that could export them. Here I’m using per file layout1. ...

February 22, 2024 · (updated April 23, 2025) · 2 min · 393 words · Kristian Alexander P