diff --git a/controllers/resources.js b/controllers/resources.js index 71bf06e4b6..fd69fc83e1 100644 --- a/controllers/resources.js +++ b/controllers/resources.js @@ -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 + }); }); }); }); diff --git a/views/resources/sitemap.jade b/views/resources/sitemap.jade index 84839975bc..0fe1ab6da6 100644 --- a/views/resources/sitemap.jade +++ b/views/resources/sitemap.jade @@ -109,4 +109,20 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9") loc #{appUrl}/#{challenge.challengeNumber} lastmod= now changefreq weekly - priority= 0.5 \ No newline at end of file + 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 \ No newline at end of file