Jekyll blog posts manager based on tabulated-list
.
Put jblog.el
in your Emacs system. Add the following to your .emacs
:
(require 'jblog)
(setq jblog-posts-directory (expand-file-name "~/blog/_posts")
jblog-post-headers [("Date" 12 t)
("Title" 36 t)
("Categories" 25 t)
("Tags" 25 t)]
jblog-post-headers-format (string-join '("---"
"layout: post"
"title: %s"
"categories: note"
"tags: note"
"---")
"\n"))
Or use use-package with straight.el:
(use-package jblog
:ensure t
:straight (:host github :repo "condy0919/jblog")
:commands jblog
:custom
(jblog-posts-directory (expand-file-name "~/blog/_posts"))
(jblog-post-headers [("Date" 12 t)
("Title" 36 t)
("Categories" 25 t)
("Tags" 25 t)])
(jblog-post-headers-format (string-join '("---"
"layout: post"
"title: %s"
"categories: note"
"tags: note"
"---")
"\n")))
Then run jblog
to get an overview of your blog posts.
YYYY-mm-dd
prefixed.Key | Function |
---|---|
C | jblog-create a new blog post |
D | jblog-delete the blog post at point |
O | jblog-open-posts-directory with dired |
s | jblog-search keywords from date, title, ... fields |
g | jblog-refresh |
q | quit-window |
jblog-posts-directory
(Default: nil
)jblog-post-default-ext
(Default: md
)jblog-post-exts-regexp
(Default: a regexp matched with md
and markdown
)jblog-post-headers
(Default: Only list Date
and Title
fields)jblog-post-headers-guard
(Default: ---
)jblog-post-headers-format
jblog-post-sort-key
describe-variable
will tell you.