i was thinking about the possibility to make a sta...
# scripting
n
i was thinking about the possibility to make a static site generator like jekyll, but in kotlin, with each .kts file representing a target .html file i assume any amount of shared code would still have to be written in .kt files and i am not sure how much data can be passed to a kotlin script at start (over more than env variables)
g
you can pass down anything you want via constructor parameters, just create your own script template
n
i finally had the time to look at that in detail but i am still puzzeled.. how do you call those scripts ?
g
@Nikky I compile them ahead of time so I load them as normal JVM classes and invoke the constructor with reflection.
invoking the constructor will execute the contents of the script body