mirror of https://github.com/jkjoy/sunpeiwen.git
19 lines
538 B
Plaintext
19 lines
538 B
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
<%
|
|
var baiduUrl = config.url
|
|
|
|
if (config.baidusitemap.url) {
|
|
baiduUrl = config.baidusitemap.url
|
|
}
|
|
|
|
var url = baiduUrl + config.root;
|
|
posts.forEach(function(post){
|
|
if(post.categories){ -%>
|
|
<url>
|
|
<loc><%- encodeURI(url + post.path) %></loc>
|
|
<lastmod><%= post.updated.toDate().toISOString().replace(/T.*$/i, "") || post.date.toDate().toISOString().replace(/T.*$/i, "") %></lastmod>
|
|
</url>
|
|
<%}}) -%>
|
|
</urlset> -%>
|