File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 88clean :
99 rm cycle
1010.PHONY : cycle
11+
12+ install :
13+ mv cycle /usr/local/bin/cycle
14+ .PHONY : install
Original file line number Diff line number Diff line change 44 :description " A opinionated static site builder."
55 :author " Adam Simpson <adam@adamsimpson.net>"
66 :license " GNU GPLv3"
7- :version " 0.2.1 "
7+ :version " 0.2.6 "
88 :serial t
99 :depends-on (
1010 :local-time
1111 :cl-json
1212 :cl-mustache
13+ :cl-ppcre
1314 :3bmd
1415 :3bmd-ext-code-blocks
1516 :unix-opts )
Original file line number Diff line number Diff line change 303303
304304(defun generate-post (title)
305305 " Take TITLE and create the necessary JSON and MD files for it."
306- (let ((date (shell " date +%Y-%m-%dT%R:%S%:z" ))
306+ (let* ((date (shell " date +%Y-%m-%dT%R:%S%:z" ))
307+ (slug (cl-ppcre :regex-replace-all " ,"
308+ (cl-ppcre :regex-replace-all " " (string-downcase title) " -" )
309+ " " ))
307310 (id (get-id))
308- (json-file (concat " ./posts/" title " .json" ))
309- (md-file (concat " ./posts/" title " .md" )))
311+ (json-file (concat " ./posts/" slug " .json" ))
312+ (md-file (concat " ./posts/" slug " .md" )))
310313 (write-file (json :encode-json-to-string ` ((" id" . , id)
311314 (" published" . , date)
312315 (" title" . , title)
You can’t perform that action at this time.
0 commit comments