assign a new variable

  • Use the Assign keyword to set a value for a variable.

Example below assigns the variable positiveVal the absolute value of -42, which is 42:

{% assign positiveVal = -42 | abs %}

This site uses Just the Docs, a documentation theme for Jekyll.