Skip to content

Commit

Permalink
Adding doc string to add-index and making name of file parametrizable.
Browse files Browse the repository at this point in the history
  • Loading branch information
gigamonkey committed Nov 29, 2011
1 parent 3ca1a8b commit 376a737
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -362,5 +362,6 @@ bits such as '..'"
(eql (first directory) :relative)
(every #'stringp (rest directory))))))

(defun add-index (filename &optional (extension "html"))
(format nil "~a~@[index~*~@[.~a~]~]" filename (ends-with #\/ filename) extension))
(defun add-index (filename &key (name "index") (extension "html"))
"Add an index file name to a directory filename. Defaults to index.html"
(format nil "~a~:[~;~a~@[.~a~]~]" filename (ends-with #\/ filename) name extension))

0 comments on commit 376a737

Please sign in to comment.