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 +4 -4
- data/Gemfile +2 -0
- data/lib/jekyll-order.rb +1 -0
- data/lib/jekyll/archives/archive_decorator.rb +24 -0
- data/lib/jekyll/order/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bae1f8910325bf7b98f91a7f7e0f63904630047e79abd802e2e573c7dd01f7f0
|
4
|
+
data.tar.gz: '04808175c17720eb1cdedf87b5746b8148934cb35c19a7637990075eb371f15b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5998ba142b16c8c9f7923c62fbc04a41f0c783188898b7518abf702a6b14ca0851d4cea817daacea1e41d81cea0281aa32212f35bf0d00fdc5c158f3ce6ce5e6
|
7
|
+
data.tar.gz: 306eeb9bb6c68cfcc78594e724676d79aca16a19fba5a5620d816725256417b3bab96feb0f15e25b50b6c628a35ce382f3fd80c4dc823b5bd8cc8a61e96fab12
|
data/Gemfile
CHANGED
data/lib/jekyll-order.rb
CHANGED
@@ -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
|
data/lib/jekyll/order/version.rb
CHANGED
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.
|
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:
|
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
|
-
|
85
|
-
|
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: []
|