I have 3 languages configured in _config.yml's 'language', and when generating archive page for the 3rd language some url strings become prepended with previos lang as such: 'lang2/lang3/tag/tagname'.
Possibly here the copy.data member after extend()'ing remains the reference, and something like the _.cloneDeep() should be used instead:
function i18narchive(locals) {
...
for (var i = 1; i< languages.length; i++){
var l = languages[i];
var copy = {};
.extend(copy, item);
copy.path = l + '/' + item.path;
copy.data.base = l + '/' + item.data.base; // .base contains the string from previous iteration
...
result.push(copy);
I have 3 languages configured in _config.yml's 'language', and when generating archive page for the 3rd language some url strings become prepended with previos lang as such: 'lang2/lang3/tag/tagname'.
Possibly here the copy.data member after extend()'ing remains the reference, and something like the _.cloneDeep() should be used instead:
function i18narchive(locals) { ... for (var i = 1; i< languages.length; i++){ var l = languages[i]; var copy = {}; .extend(copy, item); copy.path = l + '/' + item.path; copy.data.base = l + '/' + item.data.base; // .base contains the string from previous iteration ... result.push(copy);