Add and export DELETE-DOCUMENT.
This commit is contained in:
parent
62c940bde9
commit
3467157805
2 changed files with 8 additions and 3 deletions
|
@ -51,6 +51,10 @@
|
||||||
(error "There is already an existing document with the url ~a" url)
|
(error "There is already an existing document with the url ~a" url)
|
||||||
(setf (gethash url *site*) document))))
|
(setf (gethash url *site*) document))))
|
||||||
|
|
||||||
|
(defun delete-document (document)
|
||||||
|
"Given a DOCUMENT, delete it from the in-memory database."
|
||||||
|
(remhash (page-url document) *site*))
|
||||||
|
|
||||||
(defun write-document (document &optional theme-fn &rest render-args)
|
(defun write-document (document &optional theme-fn &rest render-args)
|
||||||
"Write the given DOCUMENT to disk as HTML. If THEME-FN is present,
|
"Write the given DOCUMENT to disk as HTML. If THEME-FN is present,
|
||||||
use it as the template passing any RENDER-ARGS."
|
use it as the template passing any RENDER-ARGS."
|
||||||
|
|
|
@ -25,11 +25,12 @@
|
||||||
#:get-updated-files
|
#:get-updated-files
|
||||||
#:theme-fn
|
#:theme-fn
|
||||||
;; The Document Protocol
|
;; The Document Protocol
|
||||||
#:add-document
|
|
||||||
#:find-all
|
|
||||||
#:purge-all
|
|
||||||
#:discover
|
#:discover
|
||||||
#:publish
|
#:publish
|
||||||
#:page-url
|
#:page-url
|
||||||
#:render
|
#:render
|
||||||
|
#:find-all
|
||||||
|
#:purge-all
|
||||||
|
#:add-document
|
||||||
|
#:delete-document
|
||||||
#:write-document))
|
#:write-document))
|
||||||
|
|
Loading…
Add table
Reference in a new issue