0

我一直在玩弄一个幽灵博客(ghost.org)的主题。它使用把手作为模板,我一直在查看现有的模板,看看哪些是可能的,哪些不是。

我遇到过{{!< default}}default是模板的名称。

是什么!<意思?

4

2 回答 2

1

根据官方页面关于评论的部分,{{! }}用于标记模板评论。所以,基本上< default- 只是一个被忽略的评论。

编辑:同样在mustache 手册页中明确说明:

注释以 bang 开头并被忽略。

所以,我认为,可以肯定地说,如果标签以 开头!,它不会被渲染。

于 2014-02-28T10:52:15.510 回答
1

如果您查看index.hbs默认主题的文件,您会发现以下注释:

{{! The comment above "< default" means - insert everything in this file into 
the {body} of the default.hbs template, which contains our header/footer. }}

它只是告诉页面应该插入哪个父模板

于 2014-03-02T01:43:15.523 回答