Fixed prior mistake of changing regular expression in routes.json and edited webpack.config.js: I switched the order of the object with the title and require template-config.js. This will lead to the page titles to be set properly.

This commit is contained in:
LiFaytheGoblin 2017-06-19 10:22:55 +02:00
parent 5a77a5b1a6
commit b4320b5807
2 changed files with 8 additions and 8 deletions

View file

@ -42,7 +42,7 @@
{
"name": "conference-index",
"pattern": "^/conference/?$",
"routeAlias": "/conference(?!/201[4-7])",
"routeAlias": "/conference(?!/201[4-5])",
"view": "conference/2017/index/index",
"title": "Scratch Conference",
"viewportWidth": "device-width"
@ -50,7 +50,7 @@
{
"name": "conference-index-2016",
"pattern": "^/conference/2016/?$",
"routeAlias": "/conference(?!/201[4-7])",
"routeAlias": "/conference(?!/201[4-5])",
"view": "conference/2016/index/index",
"title": "Scratch Conference",
"viewportWidth": "device-width"
@ -58,28 +58,28 @@
{
"name": "conference-plan-2016",
"pattern": "^/conference/2016/plan/?$",
"routeAlias": "/conference(?!/201[4-7])",
"routeAlias": "/conference(?!/201[4-5])",
"view": "conference/2016/plan/plan",
"title": "Plan Your Visit"
},
{
"name": "conference-expectations-2016",
"pattern": "^/conference/2016/expect/?$",
"routeAlias": "/conference(?!/201[4-7])",
"routeAlias": "/conference(?!/201[4-5])",
"view": "conference/2016/expect/expect",
"title": "What to Expect"
},
{
"name": "conference-schedule-2016",
"pattern": "^/conference/2016/schedule/?$",
"routeAlias": "/conference(?!/201[4-7])",
"routeAlias": "/conference(?!/201[4-5])",
"view": "conference/2016/schedule/schedule",
"title": "Conference Schedule"
},
{
"name": "conference-details-2016",
"pattern": "^/conference/2016/:id/details/?$",
"routeAlias": "/conference(?!/201[4-7])",
"routeAlias": "/conference(?!/201[4-5])",
"view": "conference/2016/details/details",
"title": "Event Details"
},

View file

@ -105,11 +105,11 @@ module.exports = {
].concat(routes
.filter(function (route) {return !route.redirect;})
.map(function (route) {
return new HtmlWebpackPlugin(defaults({}, require('./src/template-config.js'), {
return new HtmlWebpackPlugin(defaults({}, {
title: route.title,
filename: route.name + '.html',
route: route
}));
}, require('./src/template-config.js')));
})
).concat([
new CopyWebpackPlugin([