Firn

Firn is the static site generator for org-mode.

Why firn ?

I have been looking for a static site generator for my knowledge base for a while. This generator are required to have native or nearly native support(e.g. with plugins) for Orgmode. Unfortunately, the result is often frustrating.

Most of them don't support Org Mode

Compared to markdown, Org Mode is somewhat esoteric as a mark-up language(it can do more than that ).

Too general

Many site generators are designed to rendered a wide variety of websites. The developers added many features to make it as versatile as possible, which brings too much complexity for personal use (e.g. blog, digital garden, knowledge base etc.). Often, I find the documentation of those generators super overwhelming. I just want a tool for render all my articles... I can host my own static data and I don't really care about whether it has pagination or i18n(I am not saying that those features aren't important, but in my case, they are not necessary).

What a static site generator dedicated to Orgmode should be?

Overall: Do what Emacs is currently doing, optimize them, and add extra features.

Respect the native features of Orgmode

For example, tags, timestamps, TODOs. Especially, use the metadata provided by Orgmode.

Provide a KISS theme by default

By KISS, I mean:

  • It has light/dark mode

  • Better navigation, with toc and sitemap

  • It has syntax hightlighting

Collect/Mirror static files ready to deploy

Allow user to choose where to deploy the static files.

No configuration or guided configuration

Index page support

A classic example is the front page: / . If a user doesn't not have a index.org, it should provide a simple one, or allow user to configure one.

Future roadmap

Better result by tag

Since Orgmode support headline tags, when a user click a link of a tag, it's possible to show all headlines that have it.

Radix tree for sitemap

Cache rendered pages

  • ref: doit in Nikola

Better support for context

Better link/reference rendering

  • re-check URL escaping

  • slugify anchor links

Firn cookbook

RSS

Pack all org file into a standalone directory(which can remove the .html in URL)

Companion

Emacs

Snippet

(defun insert-firn-org-frontmatters ()
  "Return a draft org mode frontmatter string for a new article as FILE."
  (interactive)
  (let ((datetime (format-time-string "<%Y-%m-%d %a %T>")))
    (goto-char (point-min))
    (insert (concat
             "#+title: " "New Org"
             "\n#+date_created: " datetime
             "\n#+date_updated: " datetime
             "\n#+firn_private: t"
             "\n#+firn_tags: unsorted"
             "\n\n")))
  (save-buffer))