Skip to content

Commit 9542c5c

Browse files
committed
Readme fixes
1 parent 383352b commit 9542c5c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Each of the methods in the file presents an available Fluid type filter to be us
1717

1818
Return a number between _min_ and _max_ based on _index_. By default it returns a number between 0 and 100.
1919

20-
```
20+
```ruby
2121
{% for i in (1..100) %}
2222
{{ i }} - {{ forloop.index | random_number: 0, 10 }}
2323
{% endfor %}
@@ -38,7 +38,7 @@ The code above returns random numbers like:
3838
3939
You can also change the `round` parameter to generate fractions:
4040
41-
```
41+
```ruby
4242
{% for i in (1..100) %}
4343
{{ i }} - {{ forloop.index | random_number: 0, 100, 2 }}
4444
{% endfor %}
@@ -61,7 +61,7 @@ The result of code above:
6161
6262
Return random item from _items_ array based on _index_. _items_ can be array, collection, or data file.
6363
64-
```
64+
```ruby
6565
{% assign colors = 'red|green|blue|yellow|orange' | split: '|' %}
6666
{% for i in (1..100) %}
6767
{{ i }} - {{ forloop.index | random_item: colors }}
@@ -86,7 +86,7 @@ The results:
8686
8787
Return random date between _start_date_ and _end_date_. By default, it returns the date between 100 days ago and now. Returned date you can format by `date` filter to get expected result. This filter is useful when you generate birth date or register date.
8888
89-
```
89+
```ruby
9090
{% for i in (1..100) %}
9191
{{ i }} - {{ forloop.index | random_date: "2010-01-01", "2018-01-01" | date: '%B %d, %Y' }}
9292
{% endfor %}
@@ -107,7 +107,7 @@ Return random date between _start_date_ and _end_date_. By default, it returns t
107107
108108
This filter works similar to `random_date`, but returns random date between today and date _days_ago_ ago. By default return date between now and 100 days ago. It is helpful to generate random data like last login date. If you additionally use the `jekyll-timeago` filter you can get date in _2 days ago_ format.
109109
110-
```
110+
```ruby
111111
{% for i in (1..100) %}
112112
{{ i }} - {{ forloop.index | random_date_ago: 10 | timeago }}
113113
{% endfor %}
@@ -145,7 +145,7 @@ You can also change _days_ago_ parameter to negative number like `{{ forloop.ind
145145

146146
Sometimes you want to generate data in the same row with the same parameters. Because this plugin generate pseudo-random data every returned number will be the same:
147147

148-
```
148+
```ruby
149149
{% for i in (1..5) %}
150150
{{ i }} - {{ forloop.index | random_number }}, {{ forloop.index | random_number }}, {{ forloop.index | random_number }}
151151
{% endfor %}

0 commit comments

Comments
 (0)