JavaScript template docs don’t discuss exporting a data object and render function directly
Nobody has claimed this yet.
- Dominant language
- Nunjucks
- Stars
- 547
- Forks
- 726
- Avg merge
- 2h 23m
- Merged PRs (30d)
- 3
Description
I can’t find anywhere in the documentation for JavaScript templates information about exporting a data object and a render function, like this:
export const data = {
// ...
};
export function render () {
// ...
}
I only discovered that it was possible to construct JavaScript templates this way when looking at the pagination docs, where the 11ty.js and 11ty.cjs examples show how you can export these directly without wrapping them in a class.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the JavaScript templates documentation and compare it with the pagination documentation’s 11ty.js and 11ty.cjs examples. Document that templates can export a data object and render function directly, with a representative example or link, so readers can find this pattern without searching the pagination page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100