I’m 90% sure this is not possible but I wonder if anyone managed this somehow. For some users not comfortable with Go Template + Hugo it might be easier to use Javascript and Hugo Pipes to create bulk of data (for the future ability to build pages from data for ex…).
Has anyone managed to use js.Build and produce a json string instead of a compiled JS file?
I think it woudl be a great way to create dynamic configuration files (either as a core feature, or using Hugo Pipes).
In any case I think it would be beneficial for current and future users to be able to
“.Get” a javascript asset file whose purpose to print JSON,
run it with Hugo
and transform.Unmarshal its .Content.
The purpose of this thread is to feel if this is not complete non-sense before suggesting the addition of js.Run