Created
February 5, 2018 13:59
-
-
Save sweisgerber-dev/5a0f7043cee7998c73afaad250434f04 to your computer and use it in GitHub Desktop.
Jekyll/Liquid Random number generation hack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Random ID generation --> | |
{% assign min = 0 %} | |
{% assign max = 1000 %} | |
{% assign diff = max | minus: min %} | |
{% assign randomNumber = "now" | date: "%N" | modulo: diff | plus: min %} | |
<!-- /Random ID generation --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment