jekyll-order 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 363b3dc5f00f7b7cc52b3da9c4f6435f39c9eb5f62ea7981765ead4ea30b2f0c
4
- data.tar.gz: a6a0c0fd48a27939d9b8eb99900e31e3d2bd264effa6423607bf431e3c50f716
3
+ metadata.gz: 70474e8235631e10c486359036ca63a4096f0877ca943e57216cb79fe40374b9
4
+ data.tar.gz: 0f0cc6353b6ff6ccdc59bde0b9bc8a5e06cfb3e70f6f5329605db72121ac9f43
5
5
  SHA512:
6
- metadata.gz: 99b0a777570ec25f504890c65927dbd38db67659b2c412ea6e29359425c532d5eff4e5f3692432f41034bbca81f79e62b11d6b5b0fcf2d5d84fe56084a43853c
7
- data.tar.gz: feebd638c2d4f95bd6cebca1a37c563c1563c4e0c8979ecbe672b616bcad850a54fe43904980277f15a8e39b0a7c10dcf8eeec8f0ab5fab03facd510c6bd762a
6
+ metadata.gz: 9c40ddeb5fd75b5a34d18026f73dd87da1cd3c7e51fb012204b0d0b1a2facc5d93f6c925f34c1e6e1227ce078e053b46e1ab5b05047c6606e31ea2e0d03bd91b
7
+ data.tar.gz: 57e3c970ded9ef96345ccd60d2f78e89c6e9f0db4219360ec7617aa5d481af01a6ded830388aa785deae6db93d089685334783a6c528bb6f9ce38d39e8c73787
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # Jekyll::Order
1
+ # Numeric order for posts
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/jekyll/order`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Enables prioritization of posts by numeric order and date.
6
4
 
7
5
  ## Installation
8
6
 
9
7
  Add this line to your application's Gemfile:
10
8
 
11
9
  ```ruby
12
- gem 'jekyll-order'
10
+ group :jekyll_plugins do
11
+ gem 'jekyll-order'
12
+ end
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -22,22 +22,59 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ ### Configuration
26
+
27
+ Add the plugin to the plugins array in `_config.yml`:
28
+
29
+ ```yaml
30
+ plugins:
31
+ - jekyll-order
32
+ ```
33
+
34
+ ### In pages and posts
35
+
36
+ Add the `order` integer to posts:
37
+
38
+ ```yaml
39
+ ---
40
+ title: An article
41
+ order: 1
42
+ ---
43
+
44
+ Content
45
+ ```
46
+
47
+ When the site is generated, the `site.posts` liquid variable will be
48
+ ordered by the numeric value. Higher numbers go on top. If the value
49
+ is repeated, the date is used as secondary ordering factor.
26
50
 
27
51
  ## Development
28
52
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
53
+ After checking out the repo, run `bin/setup` to install dependencies.
54
+ Then, run `rake test` to run the tests. You can also run `bin/console`
55
+ for an interactive prompt that will allow you to experiment.
30
56
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
57
+ To install this gem onto your local machine, run `bundle exec rake
58
+ install`. To release a new version, update the version number in
59
+ `version.rb`, and then run `bundle exec rake release`, which will create
60
+ a git tag for the version, push git commits and tags, and push the
61
+ `.gem` file to [rubygems.org](https://rubygems.org).
32
62
 
33
63
  ## Contributing
34
64
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jekyll-order. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
65
+ Bug reports and pull requests are welcome on 0xacab.org at
66
+ <https://0xacab.org/sutty/jekyll/jekyll-order>. This
67
+ project is intended to be a safe, welcoming space for collaboration, and
68
+ contributors are expected to adhere to the [Sutty code of
69
+ conduct](https://sutty.nl/en/code-of-conduct/).
36
70
 
37
71
  ## License
38
72
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
73
+ The gem is available as free software under the terms of the GPL3
74
+ License.
40
75
 
41
76
  ## Code of Conduct
42
77
 
43
- Everyone interacting in the Jekyll::Order project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-order/blob/master/CODE_OF_CONDUCT.md).
78
+ Everyone interacting in the jekyll-order project’s
79
+ codebases, issue trackers, chat rooms and mailing lists is expected to
80
+ follow the [code of conduct](https://sutty.nl/en/code-of-conduct/).
data/jekyll-order.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ['f@sutty.nl']
12
12
 
13
13
  spec.summary = 'Jekyll plugin for numeric ordering of posts'
14
- spec.description = 'Allows to reorder post based on numeric order instead of date'
14
+ spec.description = 'Allows to reorder post based on numeric order along with date'
15
15
  spec.homepage = 'https://0xacab.org/sutty/jekyll/jekyll-order'
16
16
  spec.license = 'GPL-3.0'
17
17
 
@@ -11,7 +11,7 @@ module Jekyll
11
11
  @site_posts ||= @obj.posts.docs.sort_by do |post|
12
12
  [post.data.fetch('order', @obj.posts.docs.size + 1),
13
13
  post.data['date']]
14
- end
14
+ end.reverse
15
15
  end
16
16
  end
17
17
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Order
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2019-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.76'
41
- description: Allows to reorder post based on numeric order instead of date
41
+ description: Allows to reorder post based on numeric order along with date
42
42
  email:
43
43
  - f@sutty.nl
44
44
  executables: []