Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/jekyll-archives.rb
#	lib/jekyll-archives/archive.rb
  • Loading branch information
mnot committed Nov 3, 2016
2 parents 38d306a + 90bfe84 commit 67e56d7
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 38 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ script : script/cibuild
sudo: false

rvm:
- 2.2
- 2.1
- 2.0
- 2.3.1
- 2.2.5
- 2.1.9
env:
- ""
- JEKYLL_VERSION=3.0.0
- JEKYLL_VERSION=3.0
- JEKYLL_VERSION=2.0
matrix:
include:
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ if ENV["GH_PAGES"]
elsif ENV["JEKYLL_VERSION"]
gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
end

# Support for Ruby < 2.2.2 & activesupport
gem "activesupport", "~> 4.2" if RUBY_VERSION < '2.2.2'
21 changes: 18 additions & 3 deletions History.md → History.markdown
Original file line number Diff line number Diff line change
@@ -1,47 +1,62 @@
## HEAD

### Minor Enhancements

* Make Archive subclass of Page (#67)
* Don't limit slugs/title to strings (#41)

## 2.1.0
### Development Fixes

* Update Travis config and Gemfile for Ruby < 2.2.2 support (#68)
* Consolidate History file to work with jekyllbot (#80)

## 2.1.0

### Minor Enhancements

* Update Jekyll dependency to allow Jekyll 3 (#33)
* Update docs to reflect changes in v2.0.0 (#31)
* Add compatibility with Jekyll 3 (#48)
* Update to reflect release of Jekyll 3 (#52)
* Support revised documents/collections in Jekyll 3 (#53)

## Development Fixes
### Development Fixes

* Test against Jekyll 2, 3, and GitHub Pages (#48)

### Bug Fixes


## 2.0.0 / 2015-01-06

### Minor Enhancements

* Move Date object from `page.title` to `page.date` (#26)
* Add documentation to repository (#25)

### Bug Fixes

* Change Jekyll dependency to ~> 2.4 (#23)

## 1.0.0 / 2014-09-26

### Major Enhancements

* Support type-specific layouts
* Pass `Date` object to Liquid in case of date-based archives
* Liquid `{{ site.archives }}` support
* Generate month and day archives

### Minor Enhancements

* Add version file and move everything into `Archives` module
* Use `Jekyll::Utils.slugify` for slugging
* Require use to specify what types of archives are enabled

## 0.1.0 / 2014-08-17

* First release
* Generate year, category, and tag archives

## 0.0.0 / 2014-08-17

* Birthday!
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

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

## Getting started
Expand Down
7 changes: 1 addition & 6 deletions lib/jekyll-archives.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,8 @@ def generate(site)
@site.config['jekyll-archives'] = @config

read
render
write
@site.pages.concat(@archives)

@site.keep_files ||= []
@archives.each do |archive|
@site.keep_files << archive.relative_path
end
@site.config["archives"] = @archives
end

Expand Down
28 changes: 4 additions & 24 deletions lib/jekyll-archives/archive.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
module Jekyll
module Archives
class Archive
include Convertible
class Archive < Jekyll::Page

attr_accessor :posts, :type, :name, :slug
attr_accessor :data, :content, :output
attr_accessor :path, :ext
attr_accessor :site
attr_accessor :posts, :type, :slug

# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w[
ATTRIBUTES_FOR_LIQUID = %w(
posts
type
title
Expand All @@ -18,7 +14,7 @@ class Archive
path
url
permalink
]
).freeze

# Initialize a new Archive page
#
Expand Down Expand Up @@ -151,17 +147,6 @@ def date
end
end

# Obtain destination path.
#
# dest - The String path to the destination dir.
#
# Returns the destination file path String.
def destination(dest)
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
path = File.join(path, "index.html") if url =~ /\/$/
path
end

# Obtain the write path relative to the destination directory
#
# Returns the destination relative path String.
Expand All @@ -183,11 +168,6 @@ def regenerate?
def inspect
"#<Jekyll:Archive @type=#{@type.to_s} @title=#{@title} @data=#{@data.inspect}>"
end

# Returns the Boolean of whether this Page is HTML or not.
def html?
true
end
end
end
end

0 comments on commit 67e56d7

Please sign in to comment.