I am interested in using Jade to create static HTML files with dynamically generated data. I already have a set of JS scripts that create my data while working in Node. I would like this to be done to compute my data, and then compile my HTML page using the JS objects that I created.
eg.
var myArry = MyLib.calculateSomeArray(); var myObj = MyLib.createSomeObj(); jade.compile(myTemplate);
Jade Template:
each item in myArry li= item each val, key in myObj li
I assume that this is one of those cases where it is so obvious that I miss it in the documentation, but I do not see it, and the closest answers that I saw are related to Express, which seems to be unnecessary.
source share