eleventy
eleventy copied to clipboard
Is there a way to get data from multiple sources and make it only in the template's scope
Hello, I have a general question regarding the data. Currently, if you want to make data available to the template, you can make its file name match the template you want to work on. However, in the case where I can't or don't want to have all the data inside the same file but rather in multiple different files. To make them available to the template, I am now putting them inside the _data directory to make them global. Thus I can use them in the template.
But what if I don't want to make the data global but only in the scope of the template in which I which using them? Is there a way to do this? Thank you.