jekyll-eztags 0.0.12 → 0.0.18

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: 244b926d906ad52ea79de1e5d526328158ab7a6b
4
- data.tar.gz: fd00c619cbd79b885f2be7b6fa86ecdc8cb6ec75
3
+ metadata.gz: 77bf622c4bbe52748541d175d22e0c3d95e919d2
4
+ data.tar.gz: fe84ca3c96567073328fc317b17ffed2ff169376
5
5
  SHA512:
6
- metadata.gz: 0f8d5ea63a11c5b15083910bbbe020b6b0b74bdf614dbd26d962eb03695170acbf6b813cb3f1d86367c7f5213a3dc31ea50eb87646d8e8f75a0e77c04f487c9e
7
- data.tar.gz: 3cb27fb3cab62deb59adf162499851e9b389e000beb72c21e9030c3f835931eab9631fa4109adb80c4cb7221170e1f98d70210a13955142f4ebda600e7dab983
6
+ metadata.gz: 23bc790aa859d32cf389d09bfbb7657d109fe7dc37883c0d2ad0585d3f1cca5aa5c77ac8b9b87b1578ba0da2d0c74d4088412423e331be22402a6933046049b2
7
+ data.tar.gz: 1cab578dd06eb703b8002aa79cff9eed80164262fdc4bbfe93780efc5b2f624900638e307dbad55602ad0abfe57b7ff6db807917fc52f15ba3cbc72b4224d80d
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Jekyll::Eztags
1
+ # jekyll-eztags
2
2
 
3
- TODO: Write a gem description
3
+ jekyll-eztags is the easiest, no-B.S. tagging gem for Jekyll.
4
4
 
5
5
  ## Installation
6
6
 
@@ -12,129 +12,93 @@ And then execute:
12
12
 
13
13
  $ bundle
14
14
 
15
- Or install it yourself as:
15
+ Or, instead of the above two steps, install it on your system as:
16
16
 
17
17
  $ gem install jekyll-eztags
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ Add the following to your `_plugins/ext.rb` file:
22
22
 
23
- ## Contributing
24
-
25
- 1. Fork it ( http://github.com/<my-github-username>/jekyll-eztags/fork )
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
30
-
31
-
32
-
33
- = jekyll-eztagging
23
+ require 'jekyll/eztags'
34
24
 
35
- By Jerzy J. Gangi <mailto:eilermann@lavabit.com>, based on the Jekyll-Tagging gem by Arne Eilermann and Jens Wille
25
+ (If you do not have a `_plugins/ext.rb` file, create it.)
36
26
 
37
- jekyll-eztagging is a Jekyll plugin, to add a tag cloud and per tag pages plus feeds to your Jekyll generated Website.
27
+ Then, in your `_config.yml`, specify which layout file should be used to generate tag pages:
38
28
 
39
- == Usage
29
+ tag_page_layout: tag_page
30
+ tag_page_dir: tag
40
31
 
41
- Install it:
32
+ Create a file inside the `_layouts` folder called `tag_page.html`. (Or whatever you called your `tag_page_layout` in the previous step.) Inside this file, you are going to specify the content of the tag page. For example, when a user comes to `www.yoursite.com/tag/golfing/`, this is the page that will display. Here's an example of what it can look like (if you aren't sure what to write, paste this in):
42
33
 
43
- gem install jekyll-tagging
34
+ ```
35
+ ---
36
+ layout: default
37
+ -
38
+ <h1>Posts tagged {{page.tag}}</h1>
39
+ {% for post in page.posts %}
40
+ <article>
41
+ <h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
42
+ <div>{{ post.excerpt }}</div>
43
+ </article>
44
+ {% endfor %}
45
+ ```
44
46
 
45
- Add the following to your <tt>_plugins/ext.rb</tt> file:
47
+ That's it! Spin up Jekyll, generate your site, and you're in business.
46
48
 
47
- require 'jekyll/tagging'
49
+ ## Frequently asked questions
48
50
 
49
- And in your <tt>_config.yml</tt> you have to define your layout used to generate tag pages like:
51
+ **How do I exclude certain tags from having pages generated?**
50
52
 
51
- tag_page_layout: tag_page
52
- tag_page_dir: tag
53
+ Sometimes you don't want pages generated for a given tags; for example, you have a "needs review" tag on posts that reminds you the post needs to be reviewed. In these cases, just add `ignored_tags: [tags,to,ignore]` to your `_config.yml`.
53
54
 
54
- Now you got a new filter called <tt>tag_cloud</tt> which you can use with the <tt>site</tt> object as argument in your layout to get a cloud of all your site's tags. The tags are linked to their related tag page. Furthermore, you got a <tt>tags</tt> filter which you can feed withe a <tt>post</tt> or a <tt>site</tt> object to get a link list of all its tags.
55
+ ## What this gem is... and isn't
55
56
 
56
- You can optionally define a per tag Atom/RSS feed. In your <tt>_config.yml</tt> define the following:
57
+ I created this gem because there was no simple way to add tags to my Jekyll sites. Other tagging gems, like [jekyll-tagging](https://github.com/pattex/jekyll-tagging), contain unnecessary features (like tag clouds) while omitting very obvious features (like listing the tags for a given post). If you've tried to use one of these gems, you know what I'm talking about.
57
58
 
58
- tag_feed_layout: tag_feed
59
- tag_feed_dir: tag
59
+ This is the simple, no-frills gem I wish I had when I was setting up my first Jekyll site. Designers, programmers, webmasters, rejoice: this gem is 100% BS free. It *just works*, the way a Wordpress or Drupal or Ghost developer would expect a plugin to work.
60
60
 
61
- (<tt>tag_page_dir</tt> and <tt>tag_feed_dir</tt> can have the same value.)
61
+ Please note: I will not ruin this gem by adding features incongruent with its mission. If you want fancy features or obtuse configuration settings, go somewhere else.
62
62
 
63
+ ## Contributing
63
64
 
64
- === Ignoring tags
65
-
66
- Sometimes you don't want tag pages generated for certain pages. That's ok! Just add <tt>ignored_tags: [tags,to,ignore]</tt> to your <tt>_config.yml</tt>
67
- === Example tag page layout
68
-
69
- ---
70
- layout: default
71
- ---
72
- <h2>{{ page.tag }}</h2>
73
- <ul>
74
- {% for post in page.posts %}
75
- <li><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }} | Tags: {{ post | tags }})</li>
76
- {% endfor %}
77
- </ul>
78
-
79
- <div id="tag-cloud">
80
- {{ site | tag_cloud }}
81
- </div>
82
-
65
+ 1. Fork it ( http://github.com/jerzygangi/jekyll-eztags/fork )
66
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
67
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
68
+ 4. Push to the branch (`git push origin my-new-feature`)
69
+ 5. Create new Pull Request
83
70
 
84
- === Example layout of an Atom feed
71
+ ## Links
85
72
 
86
- ---
87
- layout: nil
88
- ---
89
- <?xml version="1.0" encoding="utf-8"?>
90
- <feed xmlns="http://www.w3.org/2005/Atom">
91
- <title>Your Title - {{ page.tag }}</title>
92
- <link href="http://example.com{{ page.url }}" rel="self"/>
93
- <link href="http://example.com/tag/{{ page.tag }}.html"/>
94
- <updated>{{ site.time | date_to_xmlschema }}</updated>
95
- <id>http://example.com/tag/{{ page.tag }}.html</id>
96
- <author>
97
- <name>Author Here</name>
98
- </author>
99
- {% for post in page.posts %}
100
- <entry>
101
- <title>{{ post.title }}</title>
102
- <link href="http://example.com{{ post.url }}"/>
103
- <updated>{{ post.date | date_to_xmlschema }}</updated>
104
- <id>http://example.com{{ post.id }}</id>
105
- <content type="html">{{ post.content | xml_escape }}</content>
106
- </entry>
107
- {% endfor %}
108
- </feed>
73
+ Documentation:: <http://rubydoc.info/gems/jekyll-eztags/frames>
74
+ Source code:: <http://github.com/pattex/jekyll-eztags>
75
+ RubyGem:: <http://rubygems.org/gems/jekyll-eztags>
109
76
 
110
- == Links
77
+ ## Credits
111
78
 
112
- <b></b>
113
- Documentation:: <http://rubydoc.info/gems/jekyll-tagging/frames>
114
- Source code:: <http://github.com/pattex/jekyll-tagging>
115
- RubyGem:: <http://rubygems.org/gems/jekyll-tagging>
79
+ Created by [Jerzy J. Gangi](https://jerzygangi.com) <mailto:jerzygangi@gmail.com>. Inspired by [jekyll-tagging](https://github.com/pattex/jekyll-tagging) by Arne Eilermann and Jens Wille.
116
80
 
117
- == License
81
+ ## License
118
82
 
119
- === The MIT License
83
+ Copyright (c) 2014 Jerzy J. Gangi
120
84
 
121
- Copyright (c) 2010-2012 University of Cologne,
122
- Albertus-Magnus-Platz, 50923 Cologne, Germany
85
+ MIT License
123
86
 
124
- Permission is hereby granted, free of charge, to any person obtaining a copy
125
- of this software and associated documentation files (the "Software"), to deal
126
- in the Software without restriction, including without limitation the rights
127
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
128
- copies of the Software, and to permit persons to whom the Software is
129
- furnished to do so, subject to the following conditions:
87
+ Permission is hereby granted, free of charge, to any person obtaining
88
+ a copy of this software and associated documentation files (the
89
+ "Software"), to deal in the Software without restriction, including
90
+ without limitation the rights to use, copy, modify, merge, publish,
91
+ distribute, sublicense, and/or sell copies of the Software, and to
92
+ permit persons to whom the Software is furnished to do so, subject to
93
+ the following conditions:
130
94
 
131
- The above copyright notice and this permission notice shall be included in
132
- all copies or substantial portions of the Software.
95
+ The above copyright notice and this permission notice shall be
96
+ included in all copies or substantial portions of the Software.
133
97
 
134
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
135
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
136
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
137
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
138
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
139
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
140
- THE SOFTWARE.
98
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
99
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
100
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
101
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
102
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
103
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
104
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -47,12 +47,12 @@ module Jekyll
47
47
 
48
48
  class TagPage < Page
49
49
 
50
- def initialize(site, base, dir, name, data = {}, extension)
50
+ def initialize(site, base, dir, name, data = {}, extension = ".html")
51
51
  self.content = data.delete('content') || ''
52
52
  self.data = data
53
53
  filename = "#{name.downcase.gsub(/[^0-9a-z]/i, '-')}#{extension}"
54
54
 
55
- super(site, base, dir[-1, 1] == '/' ? dir : '/' + dir, filename)
55
+ super(site, base, dir[-1, 1] == '/' ? dir + "/#{name.downcase.gsub(/[^0-9a-z]/i, '-')}" : '/' + dir + "/#{name.downcase.gsub(/[^0-9a-z]/i, '-')}", "index.html")
56
56
 
57
57
  data['tag'] = name
58
58
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Eztags
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.18"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-eztags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerzy J. Gangi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-17 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: A very simple Jekyll plugin to automatically generate tag pages. No fancy
55
+ description: A very simple Jekyll plugin to automatically generate post tags; no fancy
56
56
  features.
57
57
  email:
58
58
  - jerzygangi@gmail.com
@@ -60,7 +60,6 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - LICENSE.txt
64
63
  - README.md
65
64
  - Rakefile
66
65
  - lib/jekyll/eztags.rb
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 Jerzy J. Gangi
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.