update sitemap
This commit is contained in:
@ -48,13 +48,20 @@ module.exports = {
|
||||
debug('User err: ', err);
|
||||
next(err);
|
||||
}
|
||||
res.header('Content-Type', 'application/xml');
|
||||
res.render('resources/sitemap', {
|
||||
appUrl: appUrl,
|
||||
now: now,
|
||||
users: users,
|
||||
challenges: challenges,
|
||||
bonfires: bonfires
|
||||
Story.find({}, function (err, stories) {
|
||||
if (err) {
|
||||
debug('User err: ', err);
|
||||
next(err);
|
||||
}
|
||||
res.header('Content-Type', 'application/xml');
|
||||
res.render('resources/sitemap', {
|
||||
appUrl: appUrl,
|
||||
now: now,
|
||||
users: users,
|
||||
challenges: challenges,
|
||||
bonfires: bonfires,
|
||||
stories: stories
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -110,3 +110,19 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
||||
lastmod= now
|
||||
changefreq weekly
|
||||
priority= 0.5
|
||||
|
||||
//- Stories
|
||||
each story in stories
|
||||
url
|
||||
loc #{appUrl}/#{story.storyLink}
|
||||
lastmod= now
|
||||
changefreq daily
|
||||
priority= 0.9
|
||||
|
||||
//- Nonprofit
|
||||
each nonprofit in nonprofits
|
||||
url
|
||||
loc #{appUrl}/#{nonprofit.nonprofitLink}
|
||||
lastmod= now
|
||||
changefreq daily
|
||||
priority= 0.9
|
Reference in New Issue
Block a user