Skip to content

Commit

Permalink
clean up #1610/#1667 a little
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 2, 2015
1 parent 6d6682e commit cea211a
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions nikola/plugins/task/sitemap/__init__.py
Expand Up @@ -49,8 +49,7 @@

loc_format = """ <url>
<loc>{0}</loc>
<lastmod>{1}</lastmod>
{2}
<lastmod>{1}</lastmod>{2}
</url>
"""

Expand All @@ -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>"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cea211a

Please sign in to comment.