haoxins / gulp-file-include

MAINTAINER WANTED ~ [gulp-file-include] a gulp plugin for file include
MIT License
677 stars 95 forks source link

Include with part of the JSON #187

Open nadavc-jfrog opened 3 years ago

nadavc-jfrog commented 3 years ago

Consider the following JSON: [ { "title": "My post title2", "description": "...", "imgSrc": "../../img/user-stories/rti-m.png" }, { "title": "Another post", "description": "...", "imgSrc": "some-img2.png" }, { "title": "One more post", "description": "....", "imgSrc": "some-img3.png" } ] Now, lets say I want to include just one of the records somewhere, how can I do that? for example: @@include('some.html', "data.json[1]")

ZhangChengLin commented 3 years ago

Yes, is there a global variable that can be used when building a page? ?