Sitemap plugin tweaks.
This commit is contained in:
parent
d0059ed69e
commit
e44dcbf05d
2 changed files with 4 additions and 4 deletions
|
@ -18,12 +18,12 @@
|
||||||
(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))
|
(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 (hash-table-values coleslaw::*site*)))))
|
||||||
(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 "sitemap")
|
||||||
(list :config *config*
|
(list :config *config*
|
||||||
:urls urls
|
:urls urls
|
||||||
:pubdate (format-timestring nil (now)))))))
|
:pubdate (format-timestring nil (now)))))))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{namespace coleslaw.theme.feeds}
|
{namespace coleslaw.theme.sitemap}
|
||||||
|
|
||||||
{template sitemap}
|
{template sitemap}
|
||||||
<?xml version="1.0"?>{\n}
|
<?xml version="1.0"?>{\n}
|
||||||
|
|
Loading…
Add table
Reference in a new issue