handlebars-lang / handlebars-lang/handlebars.js
Template fragment support
- Dominant language
- JavaScript
- Stars
- 18.7k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
Would Handlebars be open to adding support for fragment support?
https://htmx.org/essays/template-fragments/
Essentially it lets you declare something similar to a partial inside an existing template, and then when you call to render your template you can optionally target a sub-fragment of the larger template. This helps when you need to re-render many small parts of a smaller template, that don't necessarily need re-use on other templates (and thus don't benefit from partials as much).
Contributor guide
Research direction
Start by reading the linked HTMX template-fragments essay and compare its proposed behavior with Handlebars' existing rendering model. Define how fragments would be declared, selected, and rendered, then identify the relevant implementation entry points and tests before proposing a design; the issue does not name files or a completion test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100