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:
commit
210c0aff76
1 changed files with 5 additions and 1 deletions
|
@ -10,18 +10,22 @@
|
||||||
#:staging-dir
|
#:staging-dir
|
||||||
#:theme-fn
|
#:theme-fn
|
||||||
#:write-page)
|
#:write-page)
|
||||||
|
(:import-from :local-time
|
||||||
|
#:format-timestring
|
||||||
|
#:now)
|
||||||
(:export #:enable))
|
(:export #:enable))
|
||||||
|
|
||||||
(in-package :coleslaw-sitemap)
|
(in-package :coleslaw-sitemap)
|
||||||
|
|
||||||
(defmethod deploy :before (staging)
|
(defmethod deploy :before (staging)
|
||||||
"Render sitemap.xml under document root"
|
"Render sitemap.xml under document root"
|
||||||
|
(declare (ignore staging))
|
||||||
(let ((urls (append '("" "sitemap.xml") ; empty string is for root url
|
(let ((urls (append '("" "sitemap.xml") ; empty string is for root url
|
||||||
(mapcar #'page-url (find-all 'coleslaw:post)))))
|
(mapcar #'page-url (find-all 'coleslaw:post)))))
|
||||||
(write-page (rel-path (staging-dir *config*) "sitemap.xml")
|
(write-page (rel-path (staging-dir *config*) "sitemap.xml")
|
||||||
(funcall (theme-fn 'sitemap "feeds")
|
(funcall (theme-fn 'sitemap "feeds")
|
||||||
(list :config *config*
|
(list :config *config*
|
||||||
:urls urls
|
:urls urls
|
||||||
:pubdate (make-pubdate))))))
|
:pubdate (format-timestring nil (now)))))))
|
||||||
|
|
||||||
(defun enable ())
|
(defun enable ())
|
||||||
|
|
Loading…
Add table
Reference in a new issue