Jekyll helper for adding Fridge content to your Jekyll site.
jekyll-fridge
to your Gemfile
:group :jekyll_plugins do
gem "jekyll-fridge"
end
Not using Bundler? There are other ways..
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 %}
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 %}