One of the advantages of static site generators is that they do not dictate how you write posts and what tools you use. For those who choose to write posts in Emacs, here are a few functions to automate file creation, finding and resuming the drafts and marking them as published.
If in some blogging systems writing a new post means that you have to navigate to the web site, get authenticated, visit the page from which to create a new post and use the web-based editor, with some configuration Jekyll allows you to do the same with only a few keystrokes without ever leaving Emacs.
Using Org Capture
One approach is to add a capture template which is usually bound to
The above function automatically creates the file in the
directory with the file name containing today’s date and the short
title of the post which is assumed to be at the top of the kill-ring.
It is possible to further integrate it with Emacs by writing a function that displays a list of posts in the drafts directory and provides an easy way to choose a post to resume.
Marking Post Drafts as Published
Another convenience function can be defined to move finished drafts to
The above functions can be called from
Meta-X or a key binding
could be added for it.