Jekyll helper for adding Fridge content to your Jekyll site.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
jekyll-fridge.gemspec

README.md

jekyll-fridge

Jekyll helper for adding Fridge content to your Jekyll site.

Installation

  • Add jekyll-fridge to your Gemfile:
group :jekyll_plugins do
  gem "jekyll-fridge"
end
  • Read on to configure the plugin.

Not using Bundler? There are other ways..

Usage

In _config.yml

fridge:
  client_id: sk_xxxxxxxxxx
  client_secret: xxxxxxxxxxxx

In your templates

<h1>{{site.fridge.settings.home.title}}</h1>

<nav>
  {% for item in site.fridge.navigation.content %}
    <li>{{item.title}}</li>
  {% endfor %}
</nav>

{{site.fridge.content.15.body | markdownify }}

{% for posts in site.fridge.content.blog_post %}
  <li>Post: {{post.title}}</li>
{% endfor %}

Using Jekyll filters

{% assign firefoxes = site.fridge.browser.content | where:"title", "Firefox" %}
{% for browser in firefoxes %}
  <li>{{browser.title}}</li>
{% endfor %}

{% assign pages = site.fridge.content.page | sort:"title" %}
{% for page in pages %}
  <li>{{page.title}}</li>
{% endfor %}

Filters

fridge_asset

Finds Fridge asset based on file name. Downloads asset to asset_dir (configurable. defaults to assets) and returns a url for the file.

{% for image in site.fridge.content.photo %}
  <img src="{{ image.name | fridge_asset }}" />
{% endfor %}

fridge_choices

Parses choices from a select/radio/checkbox content type.

{% assign choices = site.fridge.types.blog.categories.choices %}
{% for category in choices %}
  {{category}}
{% endfor %}

Reference