以下の YAML コードをコピーして、サンプルページのフロントマターとして使用できます。
この URL を GitHub の問題に貼り付けて、バグや質問を提出するときにセットアップを共有できます。
Handlebars
テンプレート
{{!-- wrong: {{array.0.item}} --}}
correct: array.[0].item: {{array.[0].item}}
{{!-- wrong: {{array.[0].item-class}} --}}
correct: array.[0].[item-class]: {{array.[0].[item-class]}}
{{!-- wrong: {{./true}}--}}
correct: ./[true]: {{./[true]}}
準備スクリプト
// Handlebars.registerHelper('loud', function(string) {
// return string.toUpperCase()
// });
入力
{
array: [
{
item: "item1",
"item-class": "class1",
},
],
true: "yes",
}
出力
correct: array.[0].item: item1
correct: array.[0].[item-class]: class1
correct: ./[true]: yes