ludoviclefevre/hexo-generator-seo-friendly-sitemap

View on GitHub
views/index-sitemap.ejs

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<% include encodeURLAndEscape.ejs %>
<% data.items.forEach(function(item){ %>
    <sitemap>
        <loc><%- encodeURLAndEscape(item.url) %></loc>
        <% if(item.lastModification != undefined) { %><lastmod><%= item.lastModification.toISOString() %></lastmod><% } %>
    </sitemap>
<% }) %>
</sitemapindex>
<% include meta %>