Open helmbold opened 9 years ago
Thanks for suggesting the template engine, have you had much experience using it?
I wouldn't call myself a Rythm expert, but I've used it in several projects and was pretty satisfied with it.
Are any of those projects public so I can have a look at a real world usage example?
Unfortunately not, it was all internal stuff. But it's not a big deal to setup Rythm and try it.
Ah no problem, I was going to check it supports everything JBake needs.
Is this issue still actual?
I still think that the Rythm template would be a nice improvement.
I haven't used Rythm but in general, it will always be good to support various templates. As of now, all parser engines are part of core functionality. Adding a new parser means a change in the core. I believe as a part of plugin discussions, it was discussed that we should probably extract out the parser engines so that they can be implemented independent of core jbake and injected as a plugin/extension.
Just for inspiration: take a look at clean architecture. A template engine should be a plug-in.
How can I inject it as plugin?
A template engine plugin would be an implementation of a TemplateEngine
interface. This could be injected like any other implementation of an interface with a dependency container. But in this case what gets injected would depend on some user configuration. Another way could be a ServiceLoader
approach. That would even allow to add new template engines without recompiling jbake.
The Rythm Template Engine is inspired by Microsofts Razor template engine with a nice, concise syntax. It would be nice if jbake would support Rythm.
Example: