(blist (tlbs-make-blist relative-pathname))
(in-path (gethash "in-path" blist))
(out-path (gethash "out-path" blist)))
- ;; process tags
- (when (not draft) (tlbs-make-tagids blist))
+ ;; process tags; update tag list with post when we're publishing
+ ;; the post.
+ (tlbs-make-tagids blist :update-tlist (not draft))
(when (file-modified in-path out-path)
(format t "[proc] ~s~%" x)
;; markdown -> html
; add new tlist
(push tlist *tags*)))))
-(defun tlbs-make-tagids (blist)
+(defun tlbs-make-tagids (blist &key (update-tlist t))
(let ((new-tags
(cl-ppcre:split "\\s*,\\s*" (gethash "tags" blist))))
; set tagid list in blist
(setf (gethash "tags" blist) new-tags)
; as a side effect, adjoin a potential new tlist to the tag list
- (dolist (tagid new-tags)
- (adjoin-tagid tagid blist)))
+ (when update-tlist
+ (dolist (tagid new-tags)
+ (adjoin-tagid tagid blist))))
blist)
(defun pipe-through-pandoc (blist)