Squirrelly
Get StartedTemplate SyntaxAPICommunity
7.x.x
7.x.x
  • Overview
  • FAQ
  • Demo
  • Performance
  • Changelog
  • Getting Started
    • Installation
    • Your First Template
    • Why Squirrelly?
    • What's a template engine?
  • Template Syntax
    • The Basics
    • Global References
    • Helper References
    • Filters
    • Helpers
    • Self-Closing Helpers
    • Native Helpers
    • Setting custom tags
    • Partials
    • Built-in Helpers
  • API
    • API Overview
    • Compile
    • Render
    • renderFile
    • load
    • defineFilter
    • setDefaultFilters
    • autoEscaping
    • defineHelper
    • defineNativeHelper
    • definePartial
    • defaultTags
  • Recipes
    • Squirrelly with ExpressJS
  • Guides
    • Generating Badges with Squirrelly
Powered by GitBook
On this page
  • Language Items
  • Inspiration
  1. Template Syntax

The Basics

Language Items

There are 4 types of language items in Squirrelly:

  • References (global and helper). Global references are direct references to the data you call your template with. Helper references, prefixed with @, reference data output by helpers.

  • Helpers. These are for logic in the template. Loops and conditionals are both implemented as native helpers, a special kind of helper that compiles into native JS code before rendering.

  • Filters. These are for processing a string after it’s been evaluated. Escaping and trimming are done with filters.

Inspiration

Squirrelly takes inspiration from Mustache, Handlebars, Nunjucks, Swig, and many other great template engines.

PreviousWhat's a template engine?NextGlobal References

Last updated 5 years ago