https://github.com/honmaple/emacs-maple-note
https://github.com/honmaple/emacs-maple-note
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/honmaple/emacs-maple-note
- Owner: honmaple
- License: gpl-3.0
- Created: 2019-02-20T02:34:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-21T15:37:00.000Z (about 5 years ago)
- Last Synced: 2025-08-11T19:44:21.058Z (11 months ago)
- Language: Emacs Lisp
- Size: 565 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* emacs-maple-note
My blog management base on tabulated-list like `list-packages`
** Screenshot
[[https://github.com/honmaple/emacs-maple-note/blob/master/screenshot/example.png]]
** Quickstart
#+begin_src elisp
(use-package maple-note
:quelpa (:fetcher github :repo "honmaple/emacs-maple-note")
:commands (maple-note)
:config
(setq maple-note-basedir "~/Git/pelican/content"))
#+end_src
Or alternatively, you can download the repository and install manually by doing:
#+BEGIN_SRC sehll
git clone https://github.com/honmaple/emacs-maple-note ~/.emacs.d/site-lisp/maple-note
#+END_SRC
#+begin_src elisp
(use-package maple-note
:ensure nil
:commands (maple-note))
#+end_src
** Customize
#+begin_src elisp
(setq maple-note-file-match "^[^.]*\\.\\(org\\|md\\|markdown\\)$")
(setq maple-note-basedir "~/Git/pelican/content")
(setq maple-note-postdir "posts/")
(setq maple-note-draftdir "drafts/")
#+end_src
*** Customize fields
#+begin_src elisp
(defun custom-meta-name(file name)
`(,name
face maple-note-face
follow-link t
action (lambda(&optional _) (find-file (tabulated-list-get-id)))))
(setq maple-note-fields
'((date . (("DATE" 16 t) . custom-meta-name))
(title . (("TITLE" 64 t) . custom-meta-name))
(category . (("CATEGORY" 20 t) . custom-meta-name))))
(setq maple-note-sort-field '("DATE" . t))
#+end_src
*** Customize template
#+begin_src elisp
(defun custom-file-template(file time)
(let ((template '("---"
"title: %s"
"author: honmaple"
"date: %s"
"modified: %s"
"category:"
"tags:"
"slug: %s"
"---")))
(format (string-join template "\n") (file-name-base file) time time (file-name-base file))))
(setq maple-note-template-alist
'((markdown-mode . custom-file-template)))
#+end_src
*** Customize meta parser
#+begin_src elisp
(defun custom-file-meta (file)
(with-temp-buffer
(insert-file-contents file)
(list :title (file-name-base file)
:date "2025-10-12 10:10"
:draft "true"
:category "Linux"
:tags "linux,emacs")))
(setq maple-note-meta-alist
'((markdown-mode . custom-file-meta)))
#+end_src
** Keybind
- *q* - quit window
- *r* - refresh list
- *w* - create new post
- *D* - delete current post
- *f* - filter post list
- *s* - switch status between publish and draft
- *l* - move to next field
- *h* - move to prev field