Readme.md 778 Bytes
Newer Older
Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
1
2
3
4
5
6
7
8
# Jekyll Img Srcset

This plugin resizes images to offer lower resolution images for devices with restricted screen size such as mobile.

## Installation

Add this line to your Jekyll site's `Gemfile`:

Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
9
10
11
12
13
14
```ruby
gem "jekyll-img-srcset"
```

or for the most up to date version from the git repository

Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
```ruby
gem "jekyll-img-srcset", :git => "git@gitlab2.informatik.uni-wuerzburg.de:hci-development/jekyll-img-srcset.git"
```

And add these lines to your Jekyll site's `_config.yml`:

```yaml
plugins:
  - jekyll-img-srcset
```

Then execute:

    $ bundle

Or install it yourself as:

    $ gem install hci-theme

## Usage

36
Use the Liquid tag as shown below to generate a figure tag with the requested resolutions.
Jan-Philipp Stauffert's avatar
Jan-Philipp Stauffert committed
37
38
39
40

```
{% imgsrcset src="general/map.jpg" dimension="wide" %}
```