I’m trying to get myself to write more. So I just added a function (based on this gist to automate adding a new timestamped post to my drafts folder.

It looks like this:

(setq blog-home "~/Dev/cidney.org")

(defun create-jekyll-draft
  "Creates a new buffer and file for a blog post"
  (interactive "Title of blog post: ")
         (format-time-string "%Y-%m-%d-")
         (replace-regexp-in-string " " "-"
             (replace-regexp-in-string "[^0-9a-zA-Z ]" "" title))))))
      (generate-new-buffer filename))
        (mapconcat 'identity
          '("---" "layout: post")
        "\n" "title: '" title "'\n" "date: '"
        (format-time-string "%Y-%m-%d %H:%M:%S %z")
        "'\n" "---\n"))
      (concat blog-home "/_drafts/" filename ".md"))))

Once run I have a new file in my _drafts folder, and don’t have to duplicate the title or timestamp when creating a file and inserting front matter.

Will this help? I’ll find out.