Merge pull request #38 from woudshoo/sitemap-timestamp

Changed timestamp format of the sitemap so google does not complain (and...
This commit is contained in:
Brit Butler 2013-05-18 07:20:03 -07:00
commit 210c0aff76

View file

@ -10,18 +10,22 @@
#:staging-dir
#:theme-fn
#:write-page)
(:import-from :local-time
#:format-timestring
#:now)
(:export #:enable))
(in-package :coleslaw-sitemap)
(defmethod deploy :before (staging)
"Render sitemap.xml under document root"
(declare (ignore staging))
(let ((urls (append '("" "sitemap.xml") ; empty string is for root url
(mapcar #'page-url (find-all 'coleslaw:post)))))
(write-page (rel-path (staging-dir *config*) "sitemap.xml")
(funcall (theme-fn 'sitemap "feeds")
(list :config *config*
:urls urls
:pubdate (make-pubdate))))))
:pubdate (format-timestring nil (now)))))))
(defun enable ())