                                    (when (f-exists-p default-posts-dir)
                                      default-posts-dir)))
          (title (read-string "Post title: "))
-         (file-name (blog-file-name title)))
+         (file-name (wh/blog-file-name title)))
     (find-file (f-join dir file-name))
     (insert (format "--- 
 layout: post

(defun wh/blog-update-file-name ()
  "Set the current blog post file name according to the current title and date."
  (interactive)
  (let* ((title (blog-post-title))
         ;; TODO: preserve the existing date.
         (filename (blog-file-name title)))
    (rename-file (buffer-file-name) filename)
    (rename-buffer filename)))



" title))))

(defun wh/blog-post-title ()
  "Get the post title from the YAML front matter
in the current buffer."
  (save-excursion
