你可以复制下面的 yaml 代码,并将其用作示例页面的页眉。
你可以将此 URL 粘贴到 github 问题中,以便在提交错误或问题时分享你的设置
Handlebars
模板
{{#with city as | city |}}
{{#with city.location as | loc |}}
{{city.name}}: {{loc.north}} {{loc.east}}
{{/with}}
{{/with}}
准备脚本
// Handlebars.registerHelper('loud', function(string) {
// return string.toUpperCase()
// });
输入
{
city: {
name: "San Francisco",
summary: "San Francisco is the <b>cultural center</b> of <b>Northern California</b>",
location: {
north: "37.73,",
east: -122.44,
},
population: 883305,
},
}
输出
San Francisco: 37.73, -122.44