Skip to content

Commit 67e56d7

Browse files
committed
# Conflicts: # lib/jekyll-archives.rb # lib/jekyll-archives/archive.rb
2 parents 38d306a + 90bfe84 commit 67e56d7

File tree

6 files changed

+31
-38
lines changed

6 files changed

+31
-38
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ script : script/cibuild
33
sudo: false
44

55
rvm:
6-
- 2.2
7-
- 2.1
8-
- 2.0
6+
- 2.3.1
7+
- 2.2.5
8+
- 2.1.9
99
env:
1010
- ""
11-
- JEKYLL_VERSION=3.0.0
11+
- JEKYLL_VERSION=3.0
1212
- JEKYLL_VERSION=2.0
1313
matrix:
1414
include:

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ if ENV["GH_PAGES"]
66
elsif ENV["JEKYLL_VERSION"]
77
gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
88
end
9+
10+
# Support for Ruby < 2.2.2 & activesupport
11+
gem "activesupport", "~> 4.2" if RUBY_VERSION < '2.2.2'
Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,62 @@
11
## HEAD
22

33
### Minor Enhancements
4+
5+
* Make Archive subclass of Page (#67)
46
* Don't limit slugs/title to strings (#41)
57

6-
## 2.1.0
8+
### Development Fixes
9+
10+
* Update Travis config and Gemfile for Ruby < 2.2.2 support (#68)
11+
* Consolidate History file to work with jekyllbot (#80)
12+
13+
## 2.1.0
714

815
### Minor Enhancements
16+
917
* Update Jekyll dependency to allow Jekyll 3 (#33)
1018
* Update docs to reflect changes in v2.0.0 (#31)
1119
* Add compatibility with Jekyll 3 (#48)
1220
* Update to reflect release of Jekyll 3 (#52)
1321
* Support revised documents/collections in Jekyll 3 (#53)
1422

15-
## Development Fixes
23+
### Development Fixes
24+
1625
* Test against Jekyll 2, 3, and GitHub Pages (#48)
1726

18-
### Bug Fixes
27+
1928

2029
## 2.0.0 / 2015-01-06
2130

2231
### Minor Enhancements
32+
2333
* Move Date object from `page.title` to `page.date` (#26)
2434
* Add documentation to repository (#25)
2535

2636
### Bug Fixes
37+
2738
* Change Jekyll dependency to ~> 2.4 (#23)
2839

2940
## 1.0.0 / 2014-09-26
3041

3142
### Major Enhancements
43+
3244
* Support type-specific layouts
3345
* Pass `Date` object to Liquid in case of date-based archives
3446
* Liquid `{{ site.archives }}` support
3547
* Generate month and day archives
3648

3749
### Minor Enhancements
50+
3851
* Add version file and move everything into `Archives` module
3952
* Use `Jekyll::Utils.slugify` for slugging
4053
* Require use to specify what types of archives are enabled
4154

4255
## 0.1.0 / 2014-08-17
56+
4357
* First release
4458
* Generate year, category, and tag archives
4559

4660
## 0.0.0 / 2014-08-17
61+
4762
* Birthday!

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Automatically generate post archives by dates, tags, and categories.
44

5-
[![Gem Version](https://badge.fury.io/rb/jekyll-archives.png)](http://badge.fury.io/rb/jekyll-archives)
5+
[![Gem Version](https://badge.fury.io/rb/jekyll-archives.svg)](http://badge.fury.io/rb/jekyll-archives)
66
[![Build Status](https://travis-ci.org/jekyll/jekyll-archives.svg?branch=master)](https://travis-ci.org/jekyll/jekyll-archives)
77

88
## Getting started

lib/jekyll-archives.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,8 @@ def generate(site)
3737
@site.config['jekyll-archives'] = @config
3838

3939
read
40-
render
41-
write
40+
@site.pages.concat(@archives)
4241

43-
@site.keep_files ||= []
44-
@archives.each do |archive|
45-
@site.keep_files << archive.relative_path
46-
end
4742
@site.config["archives"] = @archives
4843
end
4944

lib/jekyll-archives/archive.rb

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
module Jekyll
22
module Archives
3-
class Archive
4-
include Convertible
3+
class Archive < Jekyll::Page
54

6-
attr_accessor :posts, :type, :name, :slug
7-
attr_accessor :data, :content, :output
8-
attr_accessor :path, :ext
9-
attr_accessor :site
5+
attr_accessor :posts, :type, :slug
106

117
# Attributes for Liquid templates
12-
ATTRIBUTES_FOR_LIQUID = %w[
8+
ATTRIBUTES_FOR_LIQUID = %w(
139
posts
1410
type
1511
title
@@ -18,7 +14,7 @@ class Archive
1814
path
1915
url
2016
permalink
21-
]
17+
).freeze
2218

2319
# Initialize a new Archive page
2420
#
@@ -151,17 +147,6 @@ def date
151147
end
152148
end
153149

154-
# Obtain destination path.
155-
#
156-
# dest - The String path to the destination dir.
157-
#
158-
# Returns the destination file path String.
159-
def destination(dest)
160-
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
161-
path = File.join(path, "index.html") if url =~ /\/$/
162-
path
163-
end
164-
165150
# Obtain the write path relative to the destination directory
166151
#
167152
# Returns the destination relative path String.
@@ -183,11 +168,6 @@ def regenerate?
183168
def inspect
184169
"#<Jekyll:Archive @type=#{@type.to_s} @title=#{@title} @data=#{@data.inspect}>"
185170
end
186-
187-
# Returns the Boolean of whether this Page is HTML or not.
188-
def html?
189-
true
190-
end
191171
end
192172
end
193173
end

0 commit comments

Comments
 (0)