It would be awesome id we can create multiple files with the same content. For example, i use tags for languages and i want to assign the tag 'fr' and 'en' to a post. Actually i can't create to files at two different locations.
If we can send back an array in the link resolver, it would be cool.
Something like this should work :
// use the linkResolver to generate the filename removing the leading slash if present
const files = ctx.linkResolver(file.prismic[collectionQuery].results[i]) + fileSuffix;
if(typeof files === 'array'){
files.map(file => {
const f = file.replace(/^\//g, '')
newFiles[f] = newFile;
});
}
else
newFiles[files.replace(/^\//g, '')] = newFile;
It would be awesome id we can create multiple files with the same content. For example, i use tags for languages and i want to assign the tag 'fr' and 'en' to a post. Actually i can't create to files at two different locations.
If we can send back an array in the link resolver, it would be cool. Something like this should work :