jekyll-categorizer 0.1.0 → 1.0.0.alpha

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: ccce1e5afaf3a8adfe5d3fc96ff21c07fd64551f
4
- data.tar.gz: f980e82018fa566365a94dc5dd5d3e43f122defb
3
+ metadata.gz: 7952498c536ca77d814e1a9aa438f832aa395c5d
4
+ data.tar.gz: da4bfc39b806de164f654829406bea2cdb534343
5
5
  SHA512:
6
- metadata.gz: 123097668fae678c793ce0118ccea82eead589858d33d3adba7e94824259c13e2fe5d5ab79b8cf595d33ec58ab95f6593931986a78ea5c43774afa34ba43f291
7
- data.tar.gz: 739ed3172cc9162a47775609e561c793524f44971b84cd39b2e44ca76412748103e0a7aaa0f0e5c0f117e768d5eefe7a002e45a4dd855240b72af2b23185c6d4
6
+ metadata.gz: c62ac91dbabf22de9636b529bf4c3225761f9f052a63c6b1754109dfb99df80e8f6fba9f08143a8bb45c6d8c28de4b88ad10ffba6319047d9be8fe0a750e26c3
7
+ data.tar.gz: 05083f3741aec2964b3947a8f1aceb6f99fc5346029c6ab423979e1fdf2f87138a994da48f01c855b5326d9155a383e36ea717339d46c0c96c4d8d3dc0f0a2a7
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Ignacio Galindo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # Jekyll::Categorizer
2
+
3
+ A jekyll plugin to generate category pages using your own template.
4
+
5
+ ## Install
6
+
7
+ Add `jekyll-categorizer` to your site's Gemfile under the
8
+ `jekyll_plugins` group:
9
+
10
+
11
+ ```ruby
12
+ group "jekyll_plugins" do
13
+ gem "jekyll-categorizer"
14
+ end
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ ```bash
20
+ $ bundle install
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Configure in `_config.yml` the following settings:
26
+
27
+ ```yaml
28
+ jekyll_categorizer:
29
+ namespace: categories # this will be used for URL namespacing (E.g. /categories/foo)
30
+ layout: category # this should be your own layout
31
+ ```
32
+
33
+ and lastly, in your specified layout, make use of the following snippet:
34
+
35
+ ```
36
+ # ...
37
+ {% for post in site.categories[page.category] %}
38
+ # ...
39
+ {% endfor %}
40
+ # ...
41
+ ```
42
+
43
+ To iterate over every category post. This should build a category page for every category found in your
44
+ articles under `_posts`.
45
+
46
+ E.g. If you have a category `foo` then you'd be able to see every post
47
+ for that category under `/categories/foo.html` (using categories
48
+ namespace)
49
+
50
+ ## License
51
+
52
+ The [MIT License](LICENSE.md).
53
+
54
+ ## Contributing
55
+
56
+ Check [Code of Coduct](CODE_OF_CONDUCT.md).
57
+
58
+ 1. [Fork it](https://github.com/joiggama/jekyll-categorizer/fork)
59
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
60
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
61
+ 4. Push to the branch (`git push origin my-new-feature`)
62
+ 5. Create a new Pull Request
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'rake', '~> 10.0'
25
25
  spec.add_development_dependency 'pry-byebug', '~> 3.2.0'
26
26
 
27
- spec.add_runtime_dependency 'jekyll', '~> 2.5.3'
27
+ spec.add_runtime_dependency 'jekyll', '>= 2.5.3'
28
28
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Categorizer
3
- VERSION = '0.1.0'
3
+ VERSION = "1.0.0.alpha"
4
4
  end
5
5
  end
@@ -24,10 +24,10 @@ module Jekyll
24
24
  def initialize(site, category)
25
25
  @site = site
26
26
  @base = site.source
27
- @dir = site.config['categorizer']['dir'].gsub(/^\/*(.*)\/*$/, '\1')
27
+ @dir = site.config["jekyll_categorizer"]["namespace"].gsub(/^\/*(.*)\/*$/, '\1')
28
28
  @name = "#{category}.html"
29
29
 
30
- template_path = File.join(@base, '_layouts', "#{site.config['categorizer']['layout']}.html")
30
+ template_path = File.join(@base, "_layouts", "#{site.config["jekyll_categorizer"]["layout"]}.html")
31
31
 
32
32
  self.process(@name)
33
33
 
@@ -36,7 +36,7 @@ module Jekyll
36
36
  template_dir = File.dirname(template_path)
37
37
  template = File.basename(template_path)
38
38
  self.read_yaml(template_dir, template)
39
- self.data['category'] = category
39
+ self.data["category"] = category
40
40
  else
41
41
  @perform_render = false
42
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-categorizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Galindo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-05 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,14 +56,14 @@ dependencies:
56
56
  name: jekyll
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 2.5.3
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.5.3
69
69
  description: " A Jekyll plugin to generate custom category index pages. Bring your
@@ -75,7 +75,10 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
+ - CODE_OF_CONDUCT.md
78
79
  - Gemfile
80
+ - LICENSE.md
81
+ - README.md
79
82
  - jekyll-categorizer.gemspec
80
83
  - lib/jekyll/categorizer.rb
81
84
  - lib/jekyll/categorizer/version.rb
@@ -94,12 +97,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
97
  version: '0'
95
98
  required_rubygems_version: !ruby/object:Gem::Requirement
96
99
  requirements:
97
- - - ">="
100
+ - - ">"
98
101
  - !ruby/object:Gem::Version
99
- version: '0'
102
+ version: 1.3.1
100
103
  requirements: []
101
104
  rubyforge_project:
102
- rubygems_version: 2.4.5
105
+ rubygems_version: 2.5.0
103
106
  signing_key:
104
107
  specification_version: 4
105
108
  summary: Generate simple category index pages with ease.