Raku / Pod-To-HTML

Convert Raku docs to shiny HTML
Artistic License 2.0
12 stars 19 forks source link

No way to specify custom template engine #82

Closed Altai-man closed 3 years ago

Altai-man commented 3 years ago

Right now the HTML rendered is pushed into a template using this:

    return $stache.render($content, %context, :from[%partials], :literal);

This is not very cool, as maybe there are other template engines, maybe faster or lighter or just different than mustache, but it gives us zero options other than this one.

One could add yet another named parameter to specify the engine, but first very coupled mustache bits should be separated into "default" implementation.

JJ commented 3 years ago

Totally right. Probably the best thing would be to spin off a role and use dependency injection for this. I personally like Template::Classic, for instance.

JJ commented 3 years ago

This is probably causing Raku/documentable#142