Struggling to insert a variable in the code snippet below:
eleventyConfig.addPassthroughCopy({ "random-folder/img": "subfolder/img" });
This is what I've attempted:
var directory = "random-folder";
eleventyConfig.addPassthroughCopy({ directory + "/img": "subfolder/img" });
Unfortunately, this approach doesn't seem to be working. Any assistance would be greatly appreciated.
The source path is on the left side of the :
, and the destination is on the right. For more details on the file structure, refer to this link.