statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.64k stars 235 forks source link

Immediate/REPL during preview #926

Closed daveaglick closed 3 years ago

daveaglick commented 3 years ago

Crazy idea time!

It would be cool if while in preview mode we presented an immediate command capability. It could use the same script helper as script based metadata and inject the current execution state (the engine). This would likely be very helpful when debugging problems because you could issue commands against the current state of the engine, the output documents from the last execution, etc.

Even better would be to allow the script helper to take a custom script host class. Then we could even add some extra commands to the preview server in the form of top-level methods like Exit(), Execute(), etc.

daveaglick commented 3 years ago

This shipped!