mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-22 19:05:56 -04:00
use route name now with updated strucutre
Thanks @rschamp for this!
This commit is contained in:
parent
2eb62e8ab3
commit
bf1a99fd63
2 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ var getConditionNameForRoute = function (route, type) {
|
|||
};
|
||||
|
||||
var getHeaderNameForRoute = function (route) {
|
||||
if (route.view) return 'rewrites/' + route.view;
|
||||
if (route.name) return 'rewrites/' + route.name;
|
||||
if (route.redirect) return 'redirects/' + route.pattern;
|
||||
};
|
||||
|
||||
|
@ -234,7 +234,7 @@ async.auto({
|
|||
ignore_if_set: 0,
|
||||
type: 'REQUEST',
|
||||
dst: 'url',
|
||||
src: '"/' + route.view + '.html"',
|
||||
src: '"/' + route.name + '.html"',
|
||||
request_condition: results.appRouteRequestConditions[id].name,
|
||||
priority: 10
|
||||
};
|
||||
|
|
|
@ -30,7 +30,7 @@ MustacheRendererPlugin.prototype.apply = function (compiler) {
|
|||
compiler.plugin('emit', function (compilation, callback) {
|
||||
var outputRoutes = {};
|
||||
routes.forEach(function (route) {
|
||||
var filename = route.view + '.html';
|
||||
var filename = route.name + '.html';
|
||||
var content = render(template, route, config);
|
||||
outputRoutes[route.pattern] = filename;
|
||||
compilation.assets[filename] = {
|
||||
|
|
Loading…
Reference in a new issue