You can copy the yaml-code below and use it as frontmatter for an example page.
You can paste this URL into GitHub Issues to share your setup when filing bugs or questions
Handlebars:
Template
{{#each persons as | person |}}
{{name}} lives in {{#with (lookup ../cities [resident-in])~}}
{{name}} ({{country}})
{{/with}}
{{/each}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
// return string.toUpperCase()
// });
Input
{
persons: [
{
name: "Nils",
"resident-in": "darmstadt",
},
{
name: "Yehuda",
"resident-in": "san-francisco",
},
],
cities: {
darmstadt: {
name: "Darmstadt",
country: "Germany",
},
"san-francisco": {
name: "San Francisco",
country: "USA",
},
},
}
Output
Nils lives in Darmstadt (Germany)
Yehuda lives in San Francisco (USA)