All Projects → imgix → jekyll-imgix

imgix / jekyll-imgix

Licence: BSD-2-Clause license
A plugin for integrating imgix into Jekyll sites

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to jekyll-imgix

imgix-java
A Java client library for generating URLs with imgix
Stars: ✭ 17 (-65.31%)
Mutual labels:  images, src, url-builder, srcset, imgix, signing-imgix-urls
Jekyll Seo Tag
A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.
Stars: ✭ 1,226 (+2402.04%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Cloudinary
Jekyll plugin adding a Liquid tag for Cloudinary, for better responsive images
Stars: ✭ 79 (+61.22%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Timeago
⌛️ Ruby library to compute distance of dates in words. Originally built for Jekyll.
Stars: ✭ 130 (+165.31%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Scholar
jekyll extensions for the blogging scholar
Stars: ✭ 872 (+1679.59%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Minibundle
A minimalistic asset bundling plugin for Jekyll
Stars: ✭ 65 (+32.65%)
Mutual labels:  jekyll, jekyll-plugin
Pages Gem
A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages
Stars: ✭ 1,670 (+3308.16%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Paginate V2
Pagination Generator for Jekyll 3 (enhanced replacement for the old built-in jekyll-paginate gem) ⛺
Stars: ✭ 412 (+740.82%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Analytics
Plugin to easily add webanalytics to your jekyll site. Currently Google Analytics, Piwik and mPulse are supported.
Stars: ✭ 166 (+238.78%)
Mutual labels:  jekyll, jekyll-plugin
Github Metadata
Jekyll plugin to propagate the `site.github` namespace and set default values for use with GitHub Pages.
Stars: ✭ 184 (+275.51%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+300%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Redirect From
🔀 Seamlessly specify multiple redirections URLs for your pages and posts.
Stars: ✭ 630 (+1185.71%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Admin
A Jekyll plugin that provides users with a traditional CMS-style graphical interface to author content and administer Jekyll sites.
Stars: ✭ 2,531 (+5065.31%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Katex
Jekyll plugin for easy server-side math rendering via KaTeX
Stars: ✭ 73 (+48.98%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Import
📥 The "jekyll import" command for importing from various blogs to Jekyll format.
Stars: ✭ 424 (+765.31%)
Mutual labels:  jekyll, jekyll-plugin
Hanuman
A responsive, lightning-fast Jekyll theme built using AMP (Accelerated Mobile Pages) to speed up your blogs and websites.
Stars: ✭ 100 (+104.08%)
Mutual labels:  jekyll, jekyll-plugin
jekyll-commonmark
CommonMark generator for Jekyll
Stars: ✭ 28 (-42.86%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Gallery Generator
A Jekyll plugin that generates photo galleries from directories full of images.
Stars: ✭ 315 (+542.86%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Embed Video
Embed videos in Jekyll webpages without a plugin (Youtube, Vimeo, Twitch, Streamable, Mixer, Google Drive clips + more)
Stars: ✭ 135 (+175.51%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Minifier
Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor
Stars: ✭ 215 (+338.78%)
Mutual labels:  jekyll, jekyll-plugin

imgix logo

jekyll-imgix is a plugin for integrating imgix into Jekyll sites.

Gem Version Build Status Downloads License FOSSA Status


Installation

First, add liquid and jekyll-imgix to the :jekyll_plugins group in your Gemfile:

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:

plugins: [jekyll/imgix]

Configuration

jekyll-imgix requires a configuration block in your _config.yml:

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.

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:

<img src={{ "/images/bear.jpg" | imgix_url }} />

That will generate the following HTML in your output:

<img src="https://assets.imgix.net/images/bear.jpg" />

You can also pass parameters to the imgix_url helper like so:

<img src={{ "/images/bear.jpg" | imgix_url: w: 400, h: 300 }} />

Which would result in the following HTML:

<img src="https://assets.imgix.net/images/bear.jpg?w=400&h=300" />

Multi-source usage

To use jekyll-imgix in a multi-source setup:

<img src={{ "/images/bear.jpg" | imgix_url: "assets2.imgix.net", w: 400, h: 300 }} />
<img src={{ "/images/bear.jpg" | imgix_url: w: 400, h: 300 }} />  <!-- will use default_source from config -->

Which would generate:

<img src="https://assets2.imgix.net/images/bear.jpg?w=400&h=300" />
<img src="https://assets.imgix.net/images/bear.jpg?w=400&h=300" />

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.

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].