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
|
||||
#: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 ())
|
||||
|
|
Loading…
Add table
Reference in a new issue