Update sitemap plugin to place nicely with modified metadata
modified is a string in pelican <= 3.3 and datetime > 3.3 Sitemap used to treat it as string.
This commit is contained in:
@@ -158,6 +158,8 @@ class SitemapGenerator(object):
|
|||||||
|
|
||||||
def get_date_modified(self, page, defalut):
|
def get_date_modified(self, page, defalut):
|
||||||
if hasattr(page, 'modified'):
|
if hasattr(page, 'modified'):
|
||||||
|
if isinstance(getattr(page, 'modified'), datetime):
|
||||||
|
return getattr(page, 'modified')
|
||||||
return get_date(getattr(page, 'modified'))
|
return get_date(getattr(page, 'modified'))
|
||||||
else:
|
else:
|
||||||
return defalut
|
return defalut
|
||||||
|
|||||||
Reference in New Issue
Block a user