<% var baiduUrl = config.url if (config.baidusitemap.url) { baiduUrl = config.baidusitemap.url } var url = baiduUrl + config.root; posts.forEach(function(post){ if(post.categories){ -%> <%- encodeURI(url + post.path) %> <%= post.updated.toDate().toISOString().replace(/T.*$/i, "") || post.date.toDate().toISOString().replace(/T.*$/i, "") %> <%}}) -%> -%>