Forked from sweisgerber-dev/jekyll-liquid-random-number.html
Created
March 12, 2018 19:45
-
-
Save AlonAm/f971ef40755a8176cb64f052ff60205a to your computer and use it in GitHub Desktop.
Jekyll/Liquid Random number generation hack
This file contains hidden or 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