handle extra defaults just in case
This commit is contained in:
parent
2b071d35b4
commit
349e5fbc71
1 changed files with 13 additions and 2 deletions
|
|
@ -1,8 +1,19 @@
|
|||
module.exports = {
|
||||
lang: 'es',
|
||||
permalink: function (data) {
|
||||
let stem = data.page.filePathStem;
|
||||
|
||||
// handle slug_override
|
||||
if (data.slug_override) {
|
||||
return `/${data.lang}/${this.slugify(data.slug_override)}/`;
|
||||
return `/${data.lang}/${this.slugify(data.slug_override)}/`;
|
||||
}
|
||||
|
||||
// handle index pages
|
||||
if (stem.endsWith("/index")) {
|
||||
return `${stem}.html`; // e.g., /es/index.html
|
||||
}
|
||||
|
||||
// default for other pages
|
||||
return `${stem}/index.html`; // e.g., /es/about/index.html
|
||||
}
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue