以下のyamlコードをコピーし、サンプルページのフロントマターとして使用できます。
このURLをGitHubの問題に貼り付けて、バグや質問を提出するときにセットアップを共有できます
Handlebars
テンプレート
{{foo}}
{{foo true}}
{{foo 2 true}}
{{#foo true}}{{/foo}}
{{#foo}}{{/foo}}
準備スクリプト
Handlebars.registerHelper('helperMissing', function( /* dynamic arguments */) {
var options = arguments[arguments.length-1];
var args = Array.prototype.slice.call(arguments, 0,arguments.length-1)
return new Handlebars.SafeString("Missing: "+options.name+"("+args+")")
})
入力
null
出力
Missing: foo()
Missing: foo(true)
Missing: foo(2,true)
Missing: foo(true)