Style Guide

YAML

YAML front matter always has the same order: _template, _fieldset, then title.

---
_template:
_fieldset:
title:
otherVar:
---

Tag syntax

  • Add spaces inside curly braces
  • Prefer single-quotes around values (exception: quote escaping)

# Good
{{ tag property='value' }}         # Nice and simple
{{ tag property="Men's Jeans" }}   # Use double-quotes to escape single-quotes in content

# Bad
{{ tag property='value'}}    # No space before closing curly brace
{{tag property='value' }}    # No space after opening curly brace
{{tag property='value'}}     # No inner spaces on both curly braces
{{tag property="value"}}     # Use single quotes if possible

Reference