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 +4 -4
- data/README.md +61 -97
- data/lib/jekyll/eztags.rb +2 -2
- data/lib/jekyll/eztags/version.rb +1 -1
- metadata +3 -4
- data/LICENSE.txt +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77bf622c4bbe52748541d175d22e0c3d95e919d2
|
4
|
+
data.tar.gz: fe84ca3c96567073328fc317b17ffed2ff169376
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23bc790aa859d32cf389d09bfbb7657d109fe7dc37883c0d2ad0585d3f1cca5aa5c77ac8b9b87b1578ba0da2d0c74d4088412423e331be22402a6933046049b2
|
7
|
+
data.tar.gz: 1cab578dd06eb703b8002aa79cff9eed80164262fdc4bbfe93780efc5b2f624900638e307dbad55602ad0abfe57b7ff6db807917fc52f15ba3cbc72b4224d80d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# jekyll-eztags
|
2
2
|
|
3
|
-
|
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
|
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
|
-
|
21
|
+
Add the following to your `_plugins/ext.rb` file:
|
22
22
|
|
23
|
-
|
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
|
-
|
25
|
+
(If you do not have a `_plugins/ext.rb` file, create it.)
|
36
26
|
|
37
|
-
|
27
|
+
Then, in your `_config.yml`, specify which layout file should be used to generate tag pages:
|
38
28
|
|
39
|
-
|
29
|
+
tag_page_layout: tag_page
|
30
|
+
tag_page_dir: tag
|
40
31
|
|
41
|
-
|
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
|
-
|
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
|
-
|
47
|
+
That's it! Spin up Jekyll, generate your site, and you're in business.
|
46
48
|
|
47
|
-
|
49
|
+
## Frequently asked questions
|
48
50
|
|
49
|
-
|
51
|
+
**How do I exclude certain tags from having pages generated?**
|
50
52
|
|
51
|
-
|
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
|
-
|
55
|
+
## What this gem is... and isn't
|
55
56
|
|
56
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
-
|
71
|
+
## Links
|
85
72
|
|
86
|
-
|
87
|
-
|
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
|
-
|
77
|
+
## Credits
|
111
78
|
|
112
|
-
<
|
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
|
-
|
81
|
+
## License
|
118
82
|
|
119
|
-
|
83
|
+
Copyright (c) 2014 Jerzy J. Gangi
|
120
84
|
|
121
|
-
|
122
|
-
Albertus-Magnus-Platz, 50923 Cologne, Germany
|
85
|
+
MIT License
|
123
86
|
|
124
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
125
|
-
of this software and associated documentation files (the
|
126
|
-
in the Software without restriction, including
|
127
|
-
to use, copy, modify, merge, publish,
|
128
|
-
copies of the Software, and to
|
129
|
-
furnished to do so, subject to
|
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
|
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,
|
135
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
136
|
-
FITNESS FOR A PARTICULAR PURPOSE AND
|
137
|
-
|
138
|
-
|
139
|
-
|
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.
|
data/lib/jekyll/eztags.rb
CHANGED
@@ -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,
|
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
|
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.
|
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-
|
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
|
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
|
data/LICENSE.txt
DELETED
@@ -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.
|