Closed albertodev01 closed 2 years ago
Building such a feature would be straight-forward, but that wouldn't fit into shelf_static
. This package is explicitly (and narrowly) focused on being a solid static file handler.
Where could it be implemented then? Would it be in an existing package or in a brand new one?
I'd do it in a new package. Look at https://pub.dev/packages/shelf_mustache
On Wed, Feb 23, 2022 at 10:56 AM Alberto @.***> wrote:
Where could it be implemented then? Would it be in an existing package or in a brand new one?
ā Reply to this email directly, view it on GitHub https://github.com/dart-lang/shelf_static/issues/72#issuecomment-1049106701, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEFCQ54X4G32WHGCORRYTU4UUV5ANCNFSM5PELCKUQ . You are receiving this because you modified the open/close state.Message ID: @.***>
I haven't been able to find this feature but I'm willing to help with a PR if needed!
Imagine having this page in a file called
index.html
:I would like to be able to replace
{:name}
and{:my_age}
with some values coming from Dart, like this:In this way, the
{:some_name}
tags in the HTML code will be replaced by the values provided via Dart. The result would beThis would also allow custom HTML processed from Dart.
Please take the the
{:some_name}
syntax as example, don't focus on it. Focus on the general idea instead: might this be good? š what could I improve to make this look better?Thank you!