Interface LiquidOptions

Hierarchy

  • LiquidOptions

Properties

cache?: number | boolean | LiquidCache

Whether or not to cache resolved templates. Defaults to false.

dateFormat?: string

Default date format to use if the date filter doesn't include a format. Defaults to %A, %B %-e, %Y at %-l:%M %P %z.

dynamicPartials?: boolean

If set, treat the filepath parameter in {%include filepath %} and {%layout filepath%} as a variable, otherwise as a literal value. Defaults to true.

extname?: string

Add a extname (if filepath doesn't include one) before template file lookup. Eg: setting to ".html" will allow including file by basename. Defaults to "".

fs?: FS

fs is used to override the default file-system module with a custom implementation.

globals?: object

the global scope passed down to all partial and layout templates, i.e. templates included by include, layout and render tags.

greedy?: boolean

Whether trim*Left/trim*Right is greedy. When set to true, all consecutive blank characters including \n will be trimed regardless of line breaks. Defaults to true.

jekyllInclude?: boolean

Use jekyll style include, pass parameters to include variable of current scope. Defaults to false.

jsTruthy?: boolean

Use Javascript Truthiness. Defaults to false.

keepOutputType?: boolean

Whether or not to keep value type when writing the Output, not working for streamed rendering. Defaults to false.

layouts?: string | string[]

A directory or an array of directories from where to resolve layout templates. If it's an array, the files are looked up in the order they occur in the array. Defaults to root

lenientIf?: boolean

Modifies the behavior of strictVariables. If set, a single undefined variable will not cause an exception in the context of the if/elsif/unless tag and the default filter. Instead, it will evaluate to false and null, respectively. Irrelevant if strictVariables is not set. Defaults to false. *

operators?: Operators

An object of operators for conditional statements. Defaults to the regular Liquid operators.

orderedFilterParameters?: boolean

Respect parameter order when using filters like "for ... reversed limit", Defaults to false.

outputDelimiterLeft?: string

The left delimiter for liquid outputs. *

outputDelimiterRight?: string

The right delimiter for liquid outputs. *

outputEscape?: OutputEscapeOption

Default escape filter applied to output values, when set, you'll have to add | raw for values don't need to be escaped. Defaults to undefined.

ownPropertyOnly?: boolean

Hide scope variables from prototypes, useful when you're passing a not sanitized object into LiquidJS or need to hide prototypes from templates.

partials?: string | string[]

A directory or an array of directories from where to resolve included templates. If it's an array, the files are looked up in the order they occur in the array. Defaults to root

preserveTimezones?: boolean

Whether input strings to date filter preserve the given timezone *

relativeReference?: boolean

Allow refer to layouts/partials by relative pathname. To avoid arbitrary filesystem read, paths been referenced also need to be within corresponding root, partials, layouts. Defaults to true.

root?: string | string[]

A directory or an array of directories from where to resolve layout and include templates, and the filename passed to .renderFile(). If it's an array, the files are looked up in the order they occur in the array. Defaults to ["."]

strictFilters?: boolean

Whether or not to assert filter existence. If set to false, undefined filters will be skipped. Otherwise, undefined filters will cause an exception. Defaults to false.

strictVariables?: boolean

Whether or not to assert variable existence. If set to false, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause an exception. Defaults to false.

tagDelimiterLeft?: string

The left delimiter for liquid tags. *

tagDelimiterRight?: string

The right delimiter for liquid tags. *

timezoneOffset?: string | number

JavaScript timezone name or timezoneOffset for date filter, default to local time. That means if you're in Australia (UTC+10), it'll default to -600 or Australia/Lindeman

trimOutputLeft?: boolean

Similar to trimOutputRight, whereas the \n is exclusive. Defaults to false. See Whitespace Control for details.

trimOutputRight?: boolean

Strip blank characters (including , \t, and \r) from the right of values ({{ }}) until \n (inclusive). Defaults to false.

trimTagLeft?: boolean

Similar to trimTagRight, whereas the \n is exclusive. Defaults to false. See Whitespace Control for details.

trimTagRight?: boolean

Strip blank characters (including , \t, and \r) from the right of tags ({% %}) until \n (inclusive). Defaults to false.

Generated using TypeDoc