mkantor / operator

A web server for static and dynamic content.
https://operator.mattkantor.com
GNU General Public License v3.0
14 stars 2 forks source link

Tradeoffs between handlebars partials and `get` helper stink #10

Open mkantor opened 4 years ago

mkantor commented 4 years ago

Currently the get helper and handlebars partial syntax ({{> blah}}) serve similar purposes (including content from other files), but they don't fully overlap:

This is confusing and annoying. It would be great to eliminate these tradeoffs so that you don't need to think about when to use each one, either by combining them or making one a superset of the other.

mkantor commented 3 years ago

I'm betting the easiest approach here will be to enhance get to make it able to do a superset of what partials can do.

Last time I checked the handlebars-rust library didn't provide an easy to way to extend built in functionality like >. Even if I could do that it'd make templates less portable.

mkantor commented 3 years ago

Steps to enhance the get helper so its behavior is a superset of what partials can do: