miniblog

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

commit efc058474dd7c7fa7e9d9e5a85a1f1962d40d650
parent 682e66cbf0c59a2cb9d08934dbeb4346136aad09
Author: Decay <decay@todayiwilllaunchmyinfantsonintoorbit.com>
Date:   Sat,  2 Nov 2024 16:39:53 -0700

Fix up nested posts with rendered content and persist in the DB

Probably need to change this as we go because right now this is an easy
DOS via stack overflow, but it's good enough for initial implementation.

Diffstat:
Msrc/content.lisp | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/content.lisp b/src/content.lisp @@ -13,11 +13,14 @@ (let ((content (getf entry-obj :content)) (augmented-entry (copy-list entry-obj))) (setf (getf augmented-entry :rendered-content) (miniblog.format:markdown content)) + (miniblog.data:update-entry-rendered-content (getf augmented-entry :id) (getf augmented-entry :rendered-content)) augmented-entry) entry-obj)) (defun augment-posts-with-rendered-content (posts) (loop for post in posts + do (setf (getf post :children) + (augment-posts-with-rendered-content (getf post :children))) collect (augment-with-rendered-content post))) (defun render-posts (posts pages &key stream title root-uri header links