Merge branch 'master' into news
commit
39d66ea0da
|
@ -1,3 +1,5 @@
|
|||
[![Throughput Graph](https://graphs.waffle.io/freecodecamp/freecodecamp/throughput.svg)](https://waffle.io/freecodecamp/freecodecamp/metrics)
|
||||
|
||||
[![Stories in Ready](https://badge.waffle.io/FreeCodeCamp/freecodecamp.png?label=ready&title=Ready)](https://waffle.io/FreeCodeCamp/freecodecamp)
|
||||
<img src="https://s3.amazonaws.com/freecodecamp/logo4.0LG.png">
|
||||
|
||||
|
|
2
app.js
2
app.js
|
@ -421,7 +421,7 @@ app.post('/account/profile', userController.postUpdateProfile);
|
|||
app.post('/account/password', userController.postUpdatePassword);
|
||||
app.post('/account/delete', userController.postDeleteAccount);
|
||||
app.get('/account/unlink/:provider', userController.getOauthUnlink);
|
||||
|
||||
app.get('/sitemap.xml', resourcesController.sitemap);
|
||||
|
||||
/**
|
||||
* API examples routes.
|
||||
|
|
|
@ -23,9 +23,7 @@ exports.returnNextChallenge = function(req, res) {
|
|||
res.redirect('challenges/0');
|
||||
}
|
||||
} else {
|
||||
res.render('home', {
|
||||
title: 'Learn to Code and Become a Software Engineer',
|
||||
});
|
||||
return res.redirect('../challenges/0');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
var User = require('../models/User'),
|
||||
Challenge = require('./../models/Challenge'),
|
||||
Bonfire = require('./../models/Bonfire'),
|
||||
resources = require('./resources.json'),
|
||||
questions = resources.questions,
|
||||
steps = resources.steps,
|
||||
secrets = require('./../config/secrets'),
|
||||
Challenge = require('./../models/Challenge'),
|
||||
bonfires = require('../seed_data/bonfires.json');
|
||||
coursewares = require('../seed_data/coursewares.json');
|
||||
bonfires = require('../seed_data/bonfires.json'),
|
||||
coursewares = require('../seed_data/coursewares.json'),
|
||||
moment = require('moment'),
|
||||
Client = require('node-rest-client').Client,
|
||||
client = new Client(),
|
||||
debug = require('debug')('freecc:cntr:bonfires'),
|
||||
|
@ -50,6 +52,40 @@ module.exports = {
|
|||
});
|
||||
},
|
||||
|
||||
sitemap: function sitemap(req, res, next) {
|
||||
var appUrl = 'http://www.freecodecamp.com';
|
||||
var now = moment(new Date).format('YYYY-MM-DD');
|
||||
|
||||
errors = {};
|
||||
User.find({'profile.username': {'$ne': '' }}, function(err, users) {
|
||||
if (err) {
|
||||
debug('User err: ', err);
|
||||
next(err);
|
||||
}
|
||||
console.log('user count', users.length);
|
||||
Challenge.find({}, function (err, challenges) {
|
||||
if (err) {
|
||||
debug('User err: ', err);
|
||||
next(err);
|
||||
}
|
||||
Bonfire.find({}, function (err, bonfires) {
|
||||
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
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
deployAWebsite: function deployAWebsite(req, res) {
|
||||
res.render('resources/deploy-a-website', {
|
||||
title: 'Deploy a Dynamic Website in 7 Minutes'
|
||||
|
|
|
@ -1,309 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset
|
||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
||||
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
|
||||
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/0</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/1</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/2</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/3</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/4</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/5</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/6</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/7</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/8</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/9</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/10</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/11</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/12</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/13</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/14</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/15</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/16</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/17</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/18</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/19</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/20</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/21</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/22</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/23</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/24</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/25</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/26</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/27</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/28</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/29</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/30</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/31</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/32</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/33</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/34</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/35</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/36</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/37</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/38</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/39</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/40</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/41</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/42</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/43</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/44</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/45</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/46</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/47</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/48</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/49</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/50</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/51</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/52</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/53</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/54</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/55</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/56</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/57</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/58</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/challenges/59</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/stats</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/deploy-a-website</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/control-shortcuts</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/pair-program-with-team-viewer</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/login</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/nonprofits</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/learn-to-code</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/about</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/chromebook</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/live-pair-programming</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/privacy</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/jquery-exercises</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://www.freecodecamp.com/javascript-in-your-inbox</loc>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
</urlset>
|
|
@ -0,0 +1,112 @@
|
|||
doctype xml
|
||||
urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/install-screenhero
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/deploy-a-website
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/control-shortcuts
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/pair-program-with-team-viewer
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/login
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/nonprofits
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/learn-to-code
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/chromebook
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/live-pair-programming
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/privacy
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/jquery-exercises
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/javascript-in-your-inbox
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
|
||||
//- Home page
|
||||
url
|
||||
loc= appUrl
|
||||
lastmod= now
|
||||
changefreq daily
|
||||
priority= 0.8
|
||||
|
||||
//- Users
|
||||
each user in users
|
||||
url
|
||||
loc #{appUrl}/#{user.profile.username}
|
||||
lastmod= now
|
||||
changefreq daily
|
||||
priority= 0.9
|
||||
|
||||
//- Products
|
||||
each bonfire in bonfires
|
||||
url
|
||||
loc #{appUrl}/#{bonfire.name.replace(/\s/, '-')}
|
||||
lastmod= now
|
||||
changefreq weekly
|
||||
priority= 0.5
|
||||
|
||||
//- Challenges
|
||||
each challenge in challenges
|
||||
url
|
||||
loc #{appUrl}/#{challenge.challengeNumber}
|
||||
lastmod= now
|
||||
changefreq weekly
|
||||
priority= 0.5
|
Loading…
Reference in New Issue