Skip to content

Commit

Permalink
fixup! Atom syndication and archive support
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed May 3, 2015
1 parent 8f3247d commit c7e9d0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/plugins/task/sitemap/__init__.py
Expand Up @@ -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)
Expand Down

0 comments on commit c7e9d0a

Please sign in to comment.