jekyll-order 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70474e8235631e10c486359036ca63a4096f0877ca943e57216cb79fe40374b9
4
- data.tar.gz: 0f0cc6353b6ff6ccdc59bde0b9bc8a5e06cfb3e70f6f5329605db72121ac9f43
3
+ metadata.gz: bae1f8910325bf7b98f91a7f7e0f63904630047e79abd802e2e573c7dd01f7f0
4
+ data.tar.gz: '04808175c17720eb1cdedf87b5746b8148934cb35c19a7637990075eb371f15b'
5
5
  SHA512:
6
- metadata.gz: 9c40ddeb5fd75b5a34d18026f73dd87da1cd3c7e51fb012204b0d0b1a2facc5d93f6c925f34c1e6e1227ce078e053b46e1ab5b05047c6606e31ea2e0d03bd91b
7
- data.tar.gz: 57e3c970ded9ef96345ccd60d2f78e89c6e9f0db4219360ec7617aa5d481af01a6ded830388aa785deae6db93d089685334783a6c528bb6f9ce38d39e8c73787
6
+ metadata.gz: 5998ba142b16c8c9f7923c62fbc04a41f0c783188898b7518abf702a6b14ca0851d4cea817daacea1e41d81cea0281aa32212f35bf0d00fdc5c158f3ce6ce5e6
7
+ data.tar.gz: 306eeb9bb6c68cfcc78594e724676d79aca16a19fba5a5620d816725256417b3bab96feb0f15e25b50b6c628a35ce382f3fd80c4dc823b5bd8cc8a61e96fab12
data/Gemfile CHANGED
@@ -2,4 +2,6 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ gem 'sutty-archives'
6
+
5
7
  gemspec
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'jekyll/drops/site_drop'
4
+ require_relative 'jekyll/archives/archive_decorator'
@@ -0,0 +1,24 @@
1
+ begin
2
+ require 'jekyll-archives'
3
+
4
+ module Jekyll
5
+ module Archives
6
+ module ArchiveDecorator
7
+ def self.included(base)
8
+ base.class_eval do
9
+ def posts
10
+ @ordered_posts ||= @posts.sort_by do |post|
11
+ [post.data.fetch('order', @posts.size + 1),
12
+ post.data['date']]
13
+ end.reverse
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+
21
+ Jekyll::Archives::Archive.include Jekyll::Archives::ArchiveDecorator
22
+ rescue LoadError
23
+ puts 'no existe jekyll-archive'
24
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Order
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-order
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-11 00:00:00.000000000 Z
11
+ date: 2020-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -55,6 +55,7 @@ files:
55
55
  - bin/setup
56
56
  - jekyll-order.gemspec
57
57
  - lib/jekyll-order.rb
58
+ - lib/jekyll/archives/archive_decorator.rb
58
59
  - lib/jekyll/drops/site_drop.rb
59
60
  - lib/jekyll/order.rb
60
61
  - lib/jekyll/order/version.rb
@@ -66,7 +67,7 @@ metadata:
66
67
  homepage_uri: https://0xacab.org/sutty/jekyll/jekyll-order
67
68
  source_code_uri: https://0xacab.org/sutty/jekyll/jekyll-order
68
69
  changelog_uri: https://0xacab.org/sutty/jekyll/jekyll-order
69
- post_install_message:
70
+ post_install_message:
70
71
  rdoc_options: []
71
72
  require_paths:
72
73
  - lib
@@ -81,9 +82,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  - !ruby/object:Gem::Version
82
83
  version: '0'
83
84
  requirements: []
84
- rubyforge_project:
85
- rubygems_version: 2.7.6.2
86
- signing_key:
85
+ rubygems_version: 3.0.3
86
+ signing_key:
87
87
  specification_version: 4
88
88
  summary: Jekyll plugin for numeric ordering of posts
89
89
  test_files: []