added runtime "static templates" fix #16#56
added runtime "static templates" fix #16#56WebFreak001 wants to merge 3 commits intorejectedsoftware:masterfrom
Conversation
|
Looks good as far as I can see. The only real question to me is in which direction this could be extended and consequently how the API should be layed out. What I'm currently thinking is something like this: The second option could even output in a format that is compatible with a plain-text template engine like Mustache or similar (or that could be left for another mode). Of course for now there would just be the |
|
Great idea! What would be even cooler is a callback function for embedded code so you can for example embed lua or js |
|
I just submitted a PR for a new type of diet parsing I called "Live Mode" which outputs HTML data that it rereads from the view file at runtime. I had to do quite a bit of the same things you did here. It does support embedded D code, but only if the code hasn't changed structure at all. See the result here: #70 |
Ironically the runtime filters don't work at runtime yet.