diff --git a/.travis.yml b/.travis.yml index 69b5cdb..9843a34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/Gemfile b/Gemfile index 4296d7f..3c03798 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/History.md b/History.markdown similarity index 83% rename from History.md rename to History.markdown index caee30a..1d285d6 100644 --- a/History.md +++ b/History.markdown @@ -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! diff --git a/README.md b/README.md index 1c10ea7..08eb90e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lib/jekyll-archives.rb b/lib/jekyll-archives.rb index cb4cfce..0176594 100644 --- a/lib/jekyll-archives.rb +++ b/lib/jekyll-archives.rb @@ -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 diff --git a/lib/jekyll-archives/archive.rb b/lib/jekyll-archives/archive.rb index c5e2240..74769e1 100644 --- a/lib/jekyll-archives/archive.rb +++ b/lib/jekyll-archives/archive.rb @@ -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 @@ -18,7 +14,7 @@ class Archive path url permalink - ] + ).freeze # Initialize a new Archive page # @@ -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. @@ -183,11 +168,6 @@ def regenerate? def inspect "#" end - - # Returns the Boolean of whether this Page is HTML or not. - def html? - true - end end end end