Вопрос

I've been playing around with a theme for a ghost blog (ghost.org). It uses handlebars for its templates and I've been looking at existing ones to see what is possible and what isn't.

I have come across {{!< default}}. default is the name of a template.

What does !< mean?

Это было полезно?

Решение

If you look in the index.hbs file of the default theme you'll find this comment:

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

It simply tells the page which parent template it should be inserted into

Другие советы

According to official page section about comments, {{! }} is used to mark a template comment. So, basically < default - just a comment which is simply being ignored.

EDIT: Also in mustache man page it's clearly stated:

Comments begin with a bang and are ignored.

So, I presume, it's safe to say, that if tag starts with !, it's not going to be rendered.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top