fix directory redirects
This commit is contained in:
parent
b0a56bec64
commit
706111f8ba
|
@ -1038,6 +1038,12 @@
|
||||||
// TODO why are redirects broken?
|
// TODO why are redirects broken?
|
||||||
var redirectHtml = Mustache.render(desi.partials.redirect, view);
|
var redirectHtml = Mustache.render(desi.partials.redirect, view);
|
||||||
entity.redirects.forEach(function (redirect) {
|
entity.redirects.forEach(function (redirect) {
|
||||||
|
if ("" === path.extname(redirect)) {
|
||||||
|
redirect += "/";
|
||||||
|
}
|
||||||
|
if ("/" === redirect[redirect.length - 1]) {
|
||||||
|
redirect += "index.html";
|
||||||
|
}
|
||||||
compiled.push({
|
compiled.push({
|
||||||
contents: redirectHtml,
|
contents: redirectHtml,
|
||||||
path: redirect,
|
path: redirect,
|
||||||
|
|
Loading…
Reference in New Issue