jekyll-stickyposts 1.1.0 → 1.2.0

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
  SHA1:
3
- metadata.gz: c6eb63684ec605e9b63c8bf7cd3352f92999034d
4
- data.tar.gz: 2b975a7ea1bbf9a458f78a660e1744bb895e28e0
3
+ metadata.gz: d365b436e02b062efc4b2adcf1bf15a4621b1450
4
+ data.tar.gz: b517e5b9dc946b3cc0660df2ee0abe8f206193e5
5
5
  SHA512:
6
- metadata.gz: 24d210065cec2d9613c59e85a67cc93c4f1b0c1189673df9110d0a514e053a37f9b4a8690ee3b97d9fd197003ec31556adae27d319fcd8c0e138e3cb4c4a7c8e
7
- data.tar.gz: 337c5e50321e0627c562e819ff4a857ed24b0b9081c0951846ca4605724230abacee515ffcdc235a84c02303629ef0bf0a7c7e705bcacb58cf3668b527160d4e
6
+ metadata.gz: ad2096bbfa81d961c8b6b35869c24cbd2ae8c8f84a8ed24f1bbe8c97033985635e2b1cc391ba44451000c10475da47a29728d74b19c4cb29fe348bd101369220
7
+ data.tar.gz: a772dd9eb0c676ba4fd0abc9f3c662138261e73133f7383957895699f4a9714acfab3113b4d93e4b6510accbe33e9392925e0063d1b087106cc847a2e17a1d98
data/README.md CHANGED
@@ -4,11 +4,17 @@
4
4
 
5
5
  *StickyPosts* is a plugin for [Jekyll](https://jekyllrb.com/) that sticks/pins posts marked `sticky: true` to the top, i.e. it moves them before all others. Optionally, the posts could also appear where they normally would.
6
6
 
7
- ### Why do this?
7
+ ## Why do this?
8
8
 
9
9
  1. You want to keep important announcements, etc. at the top of your home page
10
10
  1. You want descriptive entries to appear at the top of your collections
11
11
 
12
+ ## What's new?
13
+
14
+ *v1.2.0* Add `reverse_sticky` option
15
+
16
+ *v1.1.0* Support multiple collections
17
+
12
18
  ## Installation
13
19
 
14
20
  Add the gem to your application's Gemfile:
@@ -39,6 +45,7 @@ stickyposts:
39
45
  sort: "blah" # Optional sort field; default: "date", use "none" to avoid sorting
40
46
  reverse: true # Ascending order, default: false
41
47
  retain: true # Also show sticky posts in their original positions; default: false
48
+ reverse_sticky: true # Reverse the order of the sticky posts, e.g. oldest first; default: false
42
49
 
43
50
  #collection: articles # The collection to "stickify"; default "posts"
44
51
 
@@ -52,10 +59,20 @@ stickyposts:
52
59
 
53
60
  ```
54
61
 
55
- > Note: if you set `sort` to `"none"` and don't sort as described in the next section, Jekyll will re-sort the documents by date. This may move the sticky posts out of position.
62
+ > Note: if you set `sort` to `"none"` and don't sort as described in the next section, Jekyll will re-sort the documents by date. This will likely move the sticky posts out of position.
56
63
 
57
64
  ## Usage
58
65
 
66
+ Just add a `sticky: true` entry to your front matter:
67
+
68
+ ```yaml
69
+ ---
70
+ title: Test
71
+ date: 2017-12-15 22:33:44
72
+ sticky: true
73
+ ---
74
+ ```
75
+
59
76
  If you're not using a paginator, use something like:
60
77
 
61
78
  ```html
@@ -147,4 +164,4 @@ Everyone interacting in the Jekyll::StickyPosts project's codebases, issue track
147
164
 
148
165
  ## Also by the author
149
166
 
150
- [Jekyll Tweetsert Plugin](https://github.com/ibrado/jekyll-tweetsert) - Turn tweets into Jekyll documents. Multiple timelines, filters, hashtags, automatic category/tags, and more!
167
+ [Jekyll Tweetsert Plugin](https://github.com/ibrado/jekyll-tweetsert) - Turn tweets into Jekyll posts. Multiple timelines, filters, hashtags, automatic category/tags, and more!
@@ -6,11 +6,12 @@ require "jekyll/stickyposts/version"
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "jekyll-stickyposts"
8
8
  spec.version = Jekyll::StickyPosts::VERSION
9
+ spec.required_ruby_version = '>= 2.0.0'
9
10
  spec.authors = ["Alex Ibrado"]
10
11
  spec.email = ["alex@ibrado.org"]
11
12
 
12
13
  spec.summary = %q{StickyPosts: Sticky/pinned posts for Jekyll}
13
- spec.description = %q{This Jekyll plugin sticks/pins posts tagged sticky: true, i.e. moves them before all others. Optionally, the posts could also appear where they normally would. Sorting and ordering options are available. Compatible with pagination.}
14
+ spec.description = %q{This Jekyll plugin sticks/pins posts tagged sticky: true, i.e. moves them before all others. Optionally, the posts could also appear where they normally would. Sorting and ordering options are available. Compatible with pagination and collections.}
14
15
  spec.homepage = "https://github.com/ibrado/jekyll-stickyposts"
15
16
  spec.license = "MIT"
16
17
 
@@ -83,6 +83,7 @@ module Jekyll
83
83
  end
84
84
  end
85
85
 
86
+ sticky.reverse! if config["reverse_sticky"]
86
87
  sorted.unshift(*sticky)
87
88
 
88
89
  order = 0;
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module StickyPosts
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-stickyposts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Ibrado
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-15 00:00:00.000000000 Z
11
+ date: 2017-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -40,7 +40,8 @@ dependencies:
40
40
  version: '1.16'
41
41
  description: 'This Jekyll plugin sticks/pins posts tagged sticky: true, i.e. moves
42
42
  them before all others. Optionally, the posts could also appear where they normally
43
- would. Sorting and ordering options are available. Compatible with pagination.'
43
+ would. Sorting and ordering options are available. Compatible with pagination and
44
+ collections.'
44
45
  email:
45
46
  - alex@ibrado.org
46
47
  executables: []
@@ -72,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
73
  requirements:
73
74
  - - ">="
74
75
  - !ruby/object:Gem::Version
75
- version: '0'
76
+ version: 2.0.0
76
77
  required_rubygems_version: !ruby/object:Gem::Requirement
77
78
  requirements:
78
79
  - - ">="