Merge pull request #11087 from ltegman/fix/sitemap
Fix sitemap, remove jobs remnantspull/11134/merge
commit
58cab642f0
|
@ -1,16 +0,0 @@
|
||||||
.jobs-list-highlight {
|
|
||||||
background-color: #ffc
|
|
||||||
}
|
|
||||||
|
|
||||||
a.jobs-list-highlight:hover {
|
|
||||||
background-color: #ffc
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobs-list {
|
|
||||||
cursor: pointer;
|
|
||||||
cursor: hand;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobs-checkbox-spacer input[type="checkbox"] {
|
|
||||||
margin-left: -23px
|
|
||||||
}
|
|
|
@ -1141,7 +1141,6 @@ and (max-width : 400px) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@import "chat.less";
|
@import "chat.less";
|
||||||
@import "jobs.less";
|
|
||||||
@import 'code-mirror.less';
|
@import 'code-mirror.less';
|
||||||
@import "challenge.less";
|
@import "challenge.less";
|
||||||
@import "toastr.less";
|
@import "toastr.less";
|
||||||
|
|
|
@ -119,7 +119,6 @@ export const updateNavHeight = createAction(types.updateNavHeight);
|
||||||
|
|
||||||
// data
|
// data
|
||||||
export const updateChallengesData = createAction(types.updateChallengesData);
|
export const updateChallengesData = createAction(types.updateChallengesData);
|
||||||
export const updateJobsData = createAction(types.updateJobsData);
|
|
||||||
export const updateHikesData = createAction(types.updateHikesData);
|
export const updateHikesData = createAction(types.updateHikesData);
|
||||||
|
|
||||||
export const createErrorObservable = error => Observable.just({
|
export const createErrorObservable = error => Observable.just({
|
||||||
|
|
|
@ -28,7 +28,6 @@ export default createTypes([
|
||||||
|
|
||||||
// data handling
|
// data handling
|
||||||
'updateChallengesData',
|
'updateChallengesData',
|
||||||
'updateJobsData',
|
|
||||||
'updateHikesData',
|
'updateHikesData',
|
||||||
|
|
||||||
// drawers
|
// drawers
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
import Fetchr from 'fetchr';
|
import Fetchr from 'fetchr';
|
||||||
import getHikesService from '../services/hikes';
|
import getHikesService from '../services/hikes';
|
||||||
import getJobServices from '../services/job';
|
|
||||||
import getUserServices from '../services/user';
|
import getUserServices from '../services/user';
|
||||||
import getMapServices from '../services/map';
|
import getMapServices from '../services/map';
|
||||||
|
|
||||||
export default function bootServices(app) {
|
export default function bootServices(app) {
|
||||||
const hikesService = getHikesService(app);
|
const hikesService = getHikesService(app);
|
||||||
const jobServices = getJobServices(app);
|
|
||||||
const userServices = getUserServices(app);
|
const userServices = getUserServices(app);
|
||||||
const mapServices = getMapServices(app);
|
const mapServices = getMapServices(app);
|
||||||
|
|
||||||
Fetchr.registerFetcher(hikesService);
|
Fetchr.registerFetcher(hikesService);
|
||||||
Fetchr.registerFetcher(jobServices);
|
|
||||||
Fetchr.registerFetcher(userServices);
|
Fetchr.registerFetcher(userServices);
|
||||||
Fetchr.registerFetcher(mapServices);
|
Fetchr.registerFetcher(mapServices);
|
||||||
app.use('/services', Fetchr.middleware());
|
app.use('/services', Fetchr.middleware());
|
||||||
|
|
|
@ -32,28 +32,24 @@ export default function sitemapRouter(app) {
|
||||||
const router = app.loopback.Router();
|
const router = app.loopback.Router();
|
||||||
const challenges$ = getCachedObservable(app, 'Challenge', 'dashedName');
|
const challenges$ = getCachedObservable(app, 'Challenge', 'dashedName');
|
||||||
const stories$ = getCachedObservable(app, 'Story', 'storyLink', dasherize);
|
const stories$ = getCachedObservable(app, 'Story', 'storyLink', dasherize);
|
||||||
const jobs$ = getCachedObservable(app, 'Job', 'id');
|
|
||||||
function sitemap(req, res, next) {
|
function sitemap(req, res, next) {
|
||||||
const now = moment(new Date()).format('YYYY-MM-DD');
|
const now = moment(new Date()).format('YYYY-MM-DD');
|
||||||
return Observable.combineLatest(
|
return Observable.combineLatest(
|
||||||
challenges$,
|
challenges$,
|
||||||
stories$,
|
stories$,
|
||||||
jobs$,
|
|
||||||
(
|
(
|
||||||
challenges,
|
challenges,
|
||||||
stories,
|
stories,
|
||||||
jobs
|
) => ({ challenges, stories })
|
||||||
) => ({ challenges, stories, jobs })
|
|
||||||
)
|
)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
({ challenges, stories, jobs }) => {
|
({ challenges, stories }) => {
|
||||||
res.header('Content-Type', 'application/xml');
|
res.header('Content-Type', 'application/xml');
|
||||||
res.render('resources/sitemap', {
|
res.render('resources/sitemap', {
|
||||||
appUrl,
|
appUrl,
|
||||||
now,
|
now,
|
||||||
challenges,
|
challenges,
|
||||||
stories,
|
stories
|
||||||
jobs
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
next
|
next
|
||||||
|
|
|
@ -26,7 +26,13 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
||||||
priority= 0.9
|
priority= 0.9
|
||||||
|
|
||||||
url
|
url
|
||||||
loc http://www.freecodecamp.com/labs
|
loc http://www.freecodecamp.com/about
|
||||||
|
changefreq weekly
|
||||||
|
lastmod= now
|
||||||
|
priority= 0.9
|
||||||
|
|
||||||
|
url
|
||||||
|
loc http://www.freecodecamp.com/shop
|
||||||
changefreq weekly
|
changefreq weekly
|
||||||
lastmod= now
|
lastmod= now
|
||||||
priority= 0.9
|
priority= 0.9
|
||||||
|
@ -38,14 +44,44 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
||||||
priority= 0.9
|
priority= 0.9
|
||||||
|
|
||||||
url
|
url
|
||||||
loc http://www.freecodecamp.com/jobs
|
loc http://www.freecodecamp.com/coding-bootcamp-cost-calculator
|
||||||
|
changefreq monthly
|
||||||
|
lastmod= now
|
||||||
|
priority= 0.9
|
||||||
|
|
||||||
|
url
|
||||||
|
loc http://www.freecodecamp.com/privacy
|
||||||
changefreq weekly
|
changefreq weekly
|
||||||
lastmod= now
|
lastmod= now
|
||||||
priority= 0.9
|
priority= 0.9
|
||||||
|
|
||||||
url
|
url
|
||||||
loc http://www.freecodecamp.com/coding-bootcamp-cost-calculator
|
loc http://www.freecodecamp.com/software-resources-for-nonprofits
|
||||||
changefreq monthly
|
changefreq weekly
|
||||||
|
lastmod= now
|
||||||
|
priority= 0.9
|
||||||
|
|
||||||
|
url
|
||||||
|
loc http://www.freecodecamp.com/the-fastest-web-page-on-the-internet
|
||||||
|
changefreq weekly
|
||||||
|
lastmod= now
|
||||||
|
priority= 0.9
|
||||||
|
|
||||||
|
url
|
||||||
|
loc http://www.freecodecamp.com/academic-honesty
|
||||||
|
changefreq weekly
|
||||||
|
lastmod= now
|
||||||
|
priority= 0.9
|
||||||
|
|
||||||
|
url
|
||||||
|
loc http://www.freecodecamp.com/code-of-conduct
|
||||||
|
changefreq weekly
|
||||||
|
lastmod= now
|
||||||
|
priority= 0.9
|
||||||
|
|
||||||
|
url
|
||||||
|
loc http://www.freecodecamp.com/how-nonprofit-projects-work
|
||||||
|
changefreq weekly
|
||||||
lastmod= now
|
lastmod= now
|
||||||
priority= 0.9
|
priority= 0.9
|
||||||
|
|
||||||
|
@ -55,10 +91,3 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
||||||
lastmod= now
|
lastmod= now
|
||||||
changefreq weekly
|
changefreq weekly
|
||||||
priority= 0.9
|
priority= 0.9
|
||||||
|
|
||||||
each job in jobs
|
|
||||||
url
|
|
||||||
loc #{appUrl}/jobs/#{job}
|
|
||||||
lastmod= now
|
|
||||||
changefreq monthly
|
|
||||||
priority= 0.5
|
|
||||||
|
|
Loading…
Reference in New Issue