Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Whitespace control

All tags support the following whitespace control characters:

  • - (U+002D HYPHEN-MINUS) will remove all matched whitespace
  • _ (U+005F LOW LINE) will replace all matched whitespace with a single space (U+0020 SPACE)

To adjust whitespace before the tag, the whitespace control character must be added immediately following the opening {{, {%, or {#.

To adjust whitespace after the tag, the whitespace control character must be added immediately before the closing }}, %}, or #}.

If no whitespace control character is present, the matched whitespace will be left as-is.

For example:

<h1>
    {{- title _}}
    -
    {{_ site_name -}}
</h1>

will become:

<h1>Whitespace control - Oxiplate Documentation</h1>

Short tags

There are also a couple short tags available for controlling whitespace elsewhere in templates:

  • {-} will remove all surrounding whitespace
  • {_} will replace all surrounding whitespace with a single space (U+0020 SPACE)

For example:

<p>{-}
    Hello {_}
    world! {-}
</p>

will become:

<p>Hello world!</p>