added lastmod for each url in sitemap.xml
This commit is contained in:
parent
67594d4bca
commit
99f57f3513
2 changed files with 6 additions and 1 deletions
|
@ -17,7 +17,11 @@
|
||||||
(defclass date-index (index) ())
|
(defclass date-index (index) ())
|
||||||
(defclass int-index (index) ())
|
(defclass int-index (index) ())
|
||||||
(defclass url-index (index)
|
(defclass url-index (index)
|
||||||
((urls :initform nil :initarg :urls :accessor urls)))
|
((urls :initform nil :initarg :urls :accessor urls)
|
||||||
|
(pubdate :initform (local-time:format-rfc3339-timestring nil
|
||||||
|
(local-time:now))
|
||||||
|
:initarg :pubdate
|
||||||
|
:accessor index-pubdate)))
|
||||||
|
|
||||||
(defmethod page-url ((object index))
|
(defmethod page-url ((object index))
|
||||||
(index-id object))
|
(index-id object))
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
{foreach $url in $content.urls}
|
{foreach $url in $content.urls}
|
||||||
<url>
|
<url>
|
||||||
<loc>{$config.domain}/{$url}</loc>
|
<loc>{$config.domain}/{$url}</loc>
|
||||||
|
<lastmod>{$content.pubdate}</lastmod>
|
||||||
</url>
|
</url>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</urlset>
|
</urlset>
|
||||||
|
|
Loading…
Add table
Reference in a new issue