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