Skip to content

Add template return type selection guide#245

Open
bcomnes wants to merge 3 commits intomasterfrom
docs/template-return-type-guide
Open

Add template return type selection guide#245
bcomnes wants to merge 3 commits intomasterfrom
docs/template-return-type-guide

Conversation

@bcomnes
Copy link
Copy Markdown
Owner

@bcomnes bcomnes commented Apr 18, 2026

Closes #231

The README documents all four template return types with full examples but presents them as equal options. Without guidance, users default to more complex patterns (array returns for single-file templates) when simpler ones would do.

This adds a "Choosing a template return type" comparison table before the RSS Feed Template Example. The table maps each return type to whether it supports multiple outputs, a custom filename, and when to reach for it. The guidance is: start with a string return and only switch to something more complex when you need what it provides.

Copilot AI review requested due to automatic review settings April 18, 2026 18:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a decision guide to the Templates section of the README so users can choose the simplest appropriate template return type instead of defaulting to more complex patterns.

Changes:

  • Adds a “Choosing a template return type” section with a comparison table (multiple outputs, custom filename, and recommended usage).
  • Adds brief guidance encouraging starting with string returns and escalating only when needed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
The previous description implied AsyncIterator was needed for any async
work, which is wrong -- all template forms support async functions.
The distinguishing characteristic is streaming/dynamic number of outputs.
@github-actions
Copy link
Copy Markdown

Coverage Report for CI Build 24611719140

Coverage remained the same at 91.469%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4070
Covered Lines: 3804
Line Coverage: 93.46%
Relevant Branches: 642
Covered Branches: 506
Branch Coverage: 78.82%
Branches in Coverage %: Yes
Coverage Strength: 73.62 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "when to use which" guidance for template return types

2 participants