Skip to content
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.

Convert jekyll plugin to gem #12

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* Ignore built gems */
*.gem
16 changes: 16 additions & 0 deletions jekyll-get.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Gem::Specification.new do |s|
s.name = 'jekyll-get'
s.version = '1.0.0'
s.date = '2016-06-07'
s.summary = 'Ruby gem to download data from external JSON sources to use in Jekyll site'
s.description = 'Downloads data from external JSON source(s)'
s.authors = ['Allen Kramer & Michael Pell']
s.email = '[email protected]'
s.files = ['lib/jekyll-get.rb']
s.homepage =
'http://rubygems.org/gems/jekyll-get'
s.license = 'CC0-1.0'

s.add_runtime_dependency 'hash-joiner', '~> 0.0.7'
s.add_runtime_dependency 'jekyll', '~> 3.1', '>= 3.1.6'
end
40 changes: 0 additions & 40 deletions jekyll_get.rb

This file was deleted.

2 changes: 1 addition & 1 deletion _plugins/jekyll_get.rb → lib/jekyll-get.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'hash-joiner'
require 'open-uri'

module Jekyll_Get
module JekyllGet
class Generator < Jekyll::Generator
safe true
priority :highest
Expand Down
30 changes: 26 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
# Install
#Jekyll::Get

Add this file to `_plugins` in the root of your Jekyll site.
Ruby gem to download data from external JSON sources to use in Jekyll site

# Configure
## Install

In your `_config.yml` file, add a new array with the key ```gems:``` and the value of the gem name you'd like to use.

```yml
gems: [jekyll-get]
```

Then install your gem using ```gem install jekyll-get```

or

Add the this gem to a Bundler group in your Gemfile.

```yml
group :jekyll_plugins do
gem 'jekyll-get'
end
```

Then install by running ```bundle install```

## Configure

This plugin reads settings from the `_config.yml` file. Add settings as attributes or an array of attributes for multiple files.

## Example
### Example

```yml
jekyll_get:
Expand Down