miniblog

Miniblog: A command-line static blog system in Common Lisp
Log | Files | Refs | README | LICENSE

commit 682e66cbf0c59a2cb9d08934dbeb4346136aad09
parent 1221b0df0749f37d4ad9a9f44ea633e7a8b54030
Author: Decay <decay@todayiwilllaunchmyinfantsonintoorbit.com>
Date:   Sat,  2 Nov 2024 16:14:20 -0700

Make MINIBLOG.DATA::+POST-LINK-FORMAT+ into a variable

This way if it's changed via SETF it doesn't reset itself if you reload
the system.

Diffstat:
Msrc/data.lisp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/data.lisp b/src/data.lisp @@ -1,6 +1,6 @@ (in-package :miniblog.data) -(defparameter +post-link-format+ "~a/~a/~a.html") +(defvar *post-link-format* "~a/~a/~a.html") (defun format-dates (content) (let ((created-at (getf content :created-at)) @@ -15,7 +15,7 @@ (defun format-post-link (entry) (let ((created-at (mito.dao.mixin:object-created-at entry))) - (format nil +post-link-format+ (miniblog.format:year created-at) (miniblog.format:month created-at) (mito.dao.mixin:object-id entry)))) + (format nil *post-link-format* (miniblog.format:year created-at) (miniblog.format:month created-at) (mito.dao.mixin:object-id entry)))) (defgeneric xform (entry) (:documentation "Transform an entry of some type into an idiomatic p-list"))