Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imgix/jekyll-imgix
A plugin for integrating imgix into Jekyll sites
https://github.com/imgix/jekyll-imgix
images imgix jekyll jekyll-plugin signing-imgix-urls src srcset url-builder
Last synced: about 1 month ago
JSON representation
A plugin for integrating imgix into Jekyll sites
- Host: GitHub
- URL: https://github.com/imgix/jekyll-imgix
- Owner: imgix
- License: bsd-2-clause
- Archived: true
- Created: 2015-10-21T00:33:38.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2023-08-14T20:35:24.000Z (over 1 year ago)
- Last Synced: 2024-04-24T16:58:59.997Z (8 months ago)
- Topics: images, imgix, jekyll, jekyll-plugin, signing-imgix-urls, src, srcset, url-builder
- Language: Ruby
- Homepage: https://www.imgix.com
- Size: 37.1 KB
- Stars: 51
- Watchers: 17
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-jekyll-plugins - **jekyll-imgix** - imgix](https://rubygems.org/gems/jekyll-imgix)) -- Transform, optimize, and intelligently cache your entire image library for fast websites and apps. **Freemium/Commercial** (Images & Pictures)
README
> [DEPRECATED]
>
> _This project has reached the end of its development._
> _Feel free to browse the code, but please use other solutions for integrating imgix into your Jekyll projects._![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)
`jekyll-imgix` is a plugin for integrating [imgix](https://www.imgix.com) into Jekyll sites.
[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)
[![Gem Version](https://img.shields.io/gem/v/jekyll-imgix.svg)](https://rubygems.org/gems/jekyll-imgix)
![Downloads](https://img.shields.io/gem/dt/jekyll-imgix)---
- [Installation](#installation)
- [Configuration](#configuration)
* [Multi-source configuration](#multi-source-configuration)
- [Usage](#usage)
* [Multi-source usage](#multi-source-usage)
- [Contributing](#contributing)
- [Code of Conduct](#code-of-conduct)
- [License](#license)## Installation
First, add `liquid` and `jekyll-imgix` to the `:jekyll_plugins` group in your Gemfile:
```rb
group :jekyll_plugins do
gem 'rouge'
gem 'kramdown'
gem 'liquid'
gem 'jekyll-imgix'
end
```Then include `jekyll-imgix` in the `plugins:` section of your `_config.yml` file:
``` yaml
plugins: [jekyll/imgix]
```## Configuration
jekyll-imgix requires a configuration block in your `_config.yml`:
```yaml
imgix:
source: assets.imgix.net # Your imgix source address
secure_url_token: FACEBEEF12 # (optional) The Secure URL Token associated with your source
include_library_param: true # (optional) If `true` all the URLs will include `ixlib` parameter
```### Multi-source configuration
In addition to the standard configuration flags, the following options can be used to serve images across different sources.
```yaml
imgix:
sources: # imgix source-secure_url_token key-value pairs.
assets.imgix.net: FACEBEEF12
assets2.imgix.net: # Will generate unsigned URLs
default_source: assets.imgix.net # (optional) specify a default source for generating URLs.
```Note: `sources` and `source` *cannot* be used together.
## Usage
**jekyll-imgix does not do anything unless JEKYLL_ENV is set to production**. For example,
you will want to run `JEKYLL_ENV=production jekyll build` before deploying your site to
production.jekyll-imgix exposes its functionality as a single Jekyll Filter, `imgix_url`.
Pass an existing image path to it to activate it:
```html
```That will generate the following HTML in your output:
```html
```You can also pass parameters to the `imgix_url` helper like so:
```html
```Which would result in the following HTML:
```html
```### Multi-source usage
To use jekyll-imgix in a multi-source setup:
```html
```Which would generate:
```html
```In absence of correctly configured `default_source`, `imgix_url` will report `RuntimeError` if it's used without specifying a valid source.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/imgix/jekyll-imgix.
## Code of Conduct
Users contributing to or participating in the development of this project are subject to the terms of imgix's [Code of Conduct](https://github.com/imgix/code-of-conduct).## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fjekyll-imgix.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fjekyll-imgix?ref=badge_large)