Skip to content
Permalink
Browse files

fixup! Atom syndication and archive support

  • Loading branch information
da2x committed May 3, 2015
1 parent 8f3247d commit c7e9d0ac50aa2e362c27d7a7d94b9c0eda0d3eac
Showing with 2 additions and 2 deletions.
  1. +2 −2 nikola/plugins/task/sitemap/__init__.py
@@ -175,9 +175,9 @@ def scan_locs():
continue
""" put Atom and RSS in sitemapindex[] instead of in urlset[], sitemap_path is included after it is generated """
if path.endswith('.xml') or path.endswith('.atom') or path.endswith('.rss'):
knownroots = (u'<feed', u'<rss', u'<urlset')
known_elm_roots = (u'<feed', u'<rss', u'<urlset')
filehead = io.open(real_path, 'r', encoding='utf8').read(512)
if any([root in filehead for root in knownroots]) and path != sitemap_path:
if any([elm_root in filehead for elm_root in known_elm_roots]) and path != sitemap_path:
path = path.replace(os.sep, '/')
lastmod = self.get_lastmod(real_path)
loc = urljoin(base_url, base_path + path)

0 comments on commit c7e9d0a

Please sign in to comment.