Permalink
Browse files

clean up #1610/#1667 a little

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed May 2, 2015
1 parent 6d6682e commit cea211a52be3dfd47a92571cbdd9617954432886
Showing with 3 additions and 8 deletions.
  1. +3 −8 nikola/plugins/task/sitemap/__init__.py
@@ -49,8 +49,7 @@
loc_format = """ <url>
<loc>{0}</loc>
- <lastmod>{1}</lastmod>
- {2}
+ <lastmod>{1}</lastmod>{2}
</url>
"""
@@ -70,11 +69,7 @@
</sitemap>
"""
-alternates_format = """<xhtml:link
- rel="alternate"
- hreflang="{0}"
- href="{1}"
- />"""
+alternates_format = """\n <xhtml:link rel="alternate" hreflang="{0}" href="{1}" />"""
sitemapindex_footer = "</sitemapindex>"
@@ -156,7 +151,7 @@ def scan_locs():
if loc == alt_url:
continue
alternates.append(alternates_format.format(lang, alt_url))
- urlset[loc] = loc_format.format(loc, lastmod, '\n'.join(alternates))
+ urlset[loc] = loc_format.format(loc, lastmod, ''.join(alternates))
for fname in files:
if kw['strip_indexes'] and fname == kw['index_file']:
continue # We already mapped the folder

0 comments on commit cea211a

Please sign in to comment.