Show the template used in guide/block helpers to reduce confusion.#187
Open
reggietheroman wants to merge 1 commit into
Open
Conversation
…to invoke the helper and lead to the final output.
There was a problem hiding this comment.
Pull request overview
This PR updates the “Block Helpers” section in the guide to reduce reader confusion by showing the Handlebars template used in the interactive example, not just the helper registration script and output.
Changes:
- Adds the example template to the “Block Helpers” walkthrough to improve readability and flow.
- Splits the explanatory paragraph so the template is shown between the helper setup and the description of arguments/options.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+133
to
+135
| The helper receives the `people` as its first parameter, and an `options` hash as its second parameter. The options hash | ||
| contains a property named `fn`, which you can invoke with a context just as you would invoke a normal Handlebars | ||
| template. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current guide/block helpers section is a bit confusing as referenced in #186 and the PR #185.
@jaylinski is correct to point out that the descriptions reference to
peopleis correct as seen in the example file used. However, the document is confusing to read with only the block helper preparation script and the generated output.Showing the template from the example file makes the section flow better and easier to follow.