random

Generates random number, string or alphanumeric string. Accepts length parameter.

{% assign random_string = "string" | random: 10 %}
{{ random_string | log }}

Output: uYabIgFZWm

{% assign random_alphanumeric = "alphanumeric" | random: 8 %}
{{ random_alphanumeric | log }}

Output: 2q5gJ9J3

{% assign random_number = "number" | random: 5 %}
{{ random_number | log }}

Output: 63512

Last updated