diff options
Diffstat (limited to 'plugins/sitemap/sitemap.py')
-rw-r--r-- | plugins/sitemap/sitemap.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/sitemap/sitemap.py b/plugins/sitemap/sitemap.py index 364c700..b4dea40 100644 --- a/plugins/sitemap/sitemap.py +++ b/plugins/sitemap/sitemap.py @@ -54,6 +54,7 @@ def format_date(date): tz = "-00:00" return date.strftime("%Y-%m-%dT%H:%M:%S") + tz + class SitemapGenerator(object): def __init__(self, context, settings, path, theme, output_path, *null): @@ -63,7 +64,6 @@ class SitemapGenerator(object): self.now = datetime.now() self.siteurl = settings.get('SITEURL') - self.default_timezone = settings.get('TIMEZONE', 'UTC') self.timezone = getattr(self, 'timezone', self.default_timezone) self.timezone = timezone(self.timezone) @@ -103,7 +103,7 @@ class SitemapGenerator(object): valid_keys = ('articles', 'indexes', 'pages') valid_chfreqs = ('always', 'hourly', 'daily', 'weekly', 'monthly', - 'yearly', 'never') + 'yearly', 'never') if isinstance(pris, dict): # We use items for Py3k compat. .iteritems() otherwise @@ -137,7 +137,7 @@ class SitemapGenerator(object): if getattr(page, 'status', 'published') != 'published': return - + if getattr(page, 'private', 'False') == 'True': return @@ -169,7 +169,7 @@ class SitemapGenerator(object): pageurl = '' if page.url == 'index.html' else page.url - #Exclude URLs from the sitemap: + # Exclude URLs from the sitemap: if self.format == 'xml': flag = False for regstr in self.sitemapExclude: @@ -206,9 +206,9 @@ class SitemapGenerator(object): path = os.path.join(self.output_path, 'sitemap.{0}'.format(self.format)) pages = self.context['pages'] + self.context['articles'] \ - + [ c for (c, a) in self.context['categories']] \ - + [ t for (t, a) in self.context['tags']] \ - + [ a for (a, b) in self.context['authors']] + + [c for (c, a) in self.context['categories']] \ + + [t for (t, a) in self.context['tags']] \ + + [a for (a, b) in self.context['authors']] self.set_url_wrappers_modification_date(self.context['categories']) self.set_url_wrappers_modification_date(self.context['tags']) |