Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fixup! Atom syndication and archive support
- Loading branch information
Showing
with
2 additions
and
2 deletions.
-
+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) |
|
|