Skip to content

Commit c162d72

Browse files
committed
Merge pull request #48 from jekyll/3.0-compatibility
Merge pull request 48
2 parents 73e5197 + de58dec commit c162d72

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ Gemfile.lock
33
test/destination
44
.bundle
55
pkg/
6+
.jekyll-metadata

.travis.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1+
language: ruby
2+
script : script/cibuild
3+
sudo: false
4+
15
rvm:
2-
- 2.1
3-
- 2.0
4-
- 1.9.3
6+
- 2.2
7+
- 2.1
8+
- 2.0
9+
env:
10+
- ""
11+
- JEKYLL_VERSION=3.0.0.beta8
12+
- JEKYLL_VERSION=2.0
13+
matrix:
14+
include:
15+
- # GitHub Pages
16+
rvm: 2.1.1
17+
env: GH_PAGES=true
18+
- # Ruby 1.9
19+
rvm: 1.9
20+
env: JEKYLL_VERSION=2.0

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
source 'https://rubygems.org'
22
gemspec
3+
4+
if ENV["GH_PAGES"]
5+
gem "github-pages"
6+
elsif ENV["JEKYLL_VERSION"]
7+
gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
8+
end

lib/jekyll-archives.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ module Archives
66
autoload :Archive, 'jekyll-archives/archive'
77
autoload :VERSION, 'jekyll-archives/version'
88

9+
if (Jekyll.const_defined? :Hooks)
10+
Jekyll::Hooks.register :site, :after_reset do |site|
11+
# We need to disable incremental regen for Archives to generate with the
12+
# correct content
13+
site.regenerator.instance_variable_set(:@disabled, true)
14+
end
15+
end
16+
917
class Archives < Jekyll::Generator
1018
safe true
1119

script/cibuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#! /bin/sh
2+
set -e
23

34
bundle exec rake test

0 commit comments

Comments
 (0)