jekyll-tagging 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 03a01587a551adf47669ffa68399c99d4ee65cbc
4
- data.tar.gz: 5ddd9144261b001c6dea775314705c6028170153
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ODAwNGU5NzY4ZDU1OGVkZTk2OWNkODFiY2E1Mzg1MGE0NzY1NWEwZA==
5
+ data.tar.gz: !binary |-
6
+ MTE4MmNkMjNhZDYzZTY3MDQ2M2JmZWEzZDg3MTdmZTIxZmU2NGU5Nw==
5
7
  SHA512:
6
- metadata.gz: 240e4046229f6b1faad342901a3306f07fa88e1b496adb6b75931476f24ac0199505b11397f1534511edd4d05668c55ff52f9e458fb1ea9e564e1c7b42da12c1
7
- data.tar.gz: 39b7db326f9cf5e0896e8055a03a8681c7da75958e4363e98888b7efaadfd7fcf30183fbfebb05625f88184aabdcda9509abda6d74c5cf8e010eda8e7bbf6c13
8
+ metadata.gz: !binary |-
9
+ YmZmNTBjYzVjMmU4ZDJhMTU3NmNiZWU4NWJiOWVkYTVkMjQwNmYwM2FjYmJj
10
+ NDBmOGM2YWU0NDNlNzJmZTg0MTI1MDkyZjFhN2FmMGM1OTM1ZGYyMGE4NDhi
11
+ OGU4ZGEzZmM1ZjVhYjMzNzk1ZDAzMGVmMTZjMjU2Zjk2Y2EwMTM=
12
+ data.tar.gz: !binary |-
13
+ MjM5OTBjNjdjZDRhODNmNjhmMWFhOWVjYTkxZGI2NDIzN2Q4MjdmOWY5M2Ri
14
+ MzM2NWEyZmI4M2YxM2ZmNmFmNjc1NGE4Zjc5NmVlYmMzNDBlZTU4MWY1MTU4
15
+ ZDRmZTgzMjljNDA1OWJjNDVkMDE0MWJiZTIwNTRjYTFmM2E4OWM=
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.6.0 [2014-09-03]
2
+
3
+ * Pretty permalinks for tag pages. (Steve Valaitis)
4
+ * Added support for keywords (allenlsy)
5
+
1
6
  == 0.5.0 [2013-06-06]
2
7
 
3
8
  * Added rel="tag" to posts' tag links. (Brandon Hicks)
@@ -9,6 +9,10 @@ jekyll-tagging is a Jekyll plugin, to add a tag cloud and per tag pages plus fee
9
9
  Install it:
10
10
 
11
11
  gem install jekyll-tagging
12
+
13
+ Add this line to your Jekyll project's Gemfile:
14
+
15
+ gem 'jekyll-tagging'
12
16
 
13
17
  Add the following to your <tt>_plugins/ext.rb</tt> file:
14
18
 
@@ -28,6 +32,11 @@ You can optionally define a per tag Atom/RSS feed. In your <tt>_config.yml</tt>
28
32
 
29
33
  (<tt>tag_page_dir</tt> and <tt>tag_feed_dir</tt> can have the same value.)
30
34
 
35
+ === Pretty page links
36
+
37
+ If your Jekyll <tt>permalink</tt> configuration is set to something other than <tt>:pretty</tt>, and you still want to have pretty tag links define the following in your <tt>_config.yml</tt>:
38
+
39
+ tag_permalink_style: pretty
31
40
 
32
41
  === Ignoring tags
33
42
 
data/Rakefile CHANGED
@@ -10,6 +10,7 @@ begin
10
10
  :summary => %q{Jekyll plugin to automatically generate a tag cloud and tag pages.},
11
11
  :authors => ['Arne Eilermann', 'Jens Wille'],
12
12
  :email => ['eilermann@lavabit.com', 'jens.wille@uni-koeln.de'],
13
+ :license => %q{MIT},
13
14
  :homepage => :pattex,
14
15
  :dependencies => %w[ruby-nuggets]
15
16
  }
@@ -32,13 +32,18 @@ module Jekyll
32
32
  def new_tag(tag, posts)
33
33
  self.class.types.each { |type|
34
34
  if layout = site.config["tag_#{type}_layout"]
35
- data = { 'layout' => layout, 'posts' => posts.sort.reverse! }
35
+ data = { 'layout' => layout, 'posts' => posts.sort.reverse!, 'tag' => tag }
36
36
 
37
37
  name = yield data if block_given?
38
+ name ||= tag
39
+
40
+ tag_dir = site.config["tag_#{type}_dir"]
41
+ tag_dir = File.join(tag_dir, (pretty? ? name : ''))
42
+
43
+ page_name = "#{pretty? ? 'index' : name}#{site.layouts[data['layout']].ext}"
38
44
 
39
45
  site.pages << TagPage.new(
40
- site, site.source, site.config["tag_#{type}_dir"],
41
- "#{name || tag}#{site.layouts[data['layout']].ext}", data
46
+ site, site.source, tag_dir, page_name, data
42
47
  )
43
48
  end
44
49
  }
@@ -71,6 +76,10 @@ module Jekyll
71
76
  site.tags.reject { |t| site.config["ignored_tags"].include? t[0] }
72
77
  end
73
78
 
79
+ def pretty?
80
+ @pretty ||= (site.permalink_style == :pretty || site.config['tag_permalink_style'] == 'pretty')
81
+ end
82
+
74
83
  end
75
84
 
76
85
  class TagPage < Page
@@ -80,8 +89,6 @@ module Jekyll
80
89
  self.data = data
81
90
 
82
91
  super(site, base, dir[-1, 1] == '/' ? dir : '/' + dir, name)
83
-
84
- data['tag'] ||= basename
85
92
  end
86
93
 
87
94
  def read_yaml(*)
@@ -105,7 +112,7 @@ module Jekyll
105
112
 
106
113
  def tag_url(tag, type = :page, site = Tagger.site)
107
114
  url = File.join('', site.config["tag_#{type}_dir"], ERB::Util.u(tag))
108
- site.permalink_style == :pretty ? url : url << '.html'
115
+ site.permalink_style == :pretty || site.config['tag_permalink_style'] == 'pretty' ? url : url << '.html'
109
116
  end
110
117
 
111
118
  def tags(obj)
@@ -115,6 +122,12 @@ module Jekyll
115
122
  tags.join(', ')
116
123
  end
117
124
 
125
+ def keywords(obj)
126
+ return '' if not obj['tags']
127
+ tags = obj['tags'].dup
128
+ tags.join(',')
129
+ end
130
+
118
131
  def active_tag_data(site = Tagger.site)
119
132
  return site.config['tag_data'] unless site.config["ignored_tags"]
120
133
  site.config["tag_data"].reject { |tag, set| site.config["ignored_tags"].include? tag }
@@ -5,7 +5,7 @@ module Jekyll
5
5
  module Version
6
6
 
7
7
  MAJOR = 0
8
- MINOR = 5
8
+ MINOR = 6
9
9
  TINY = 0
10
10
 
11
11
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-tagging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Eilermann
@@ -9,20 +9,48 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-06 00:00:00.000000000 Z
12
+ date: 2014-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-nuggets
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ! '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: hen
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
26
54
  - !ruby/object:Gem::Version
27
55
  version: '0'
28
56
  description: Jekyll plugin to automatically generate a tag cloud and tag pages.
@@ -34,39 +62,50 @@ extensions: []
34
62
  extra_rdoc_files:
35
63
  - ChangeLog
36
64
  files:
37
- - lib/jekyll/tagging.rb
38
- - lib/jekyll/tagging/version.rb
39
65
  - ChangeLog
40
66
  - README.rdoc
41
67
  - Rakefile
68
+ - lib/jekyll/tagging.rb
69
+ - lib/jekyll/tagging/version.rb
42
70
  homepage: http://github.com/pattex/jekyll-tagging
43
- licenses: []
71
+ licenses:
72
+ - MIT
44
73
  metadata: {}
45
- post_install_message:
74
+ post_install_message: ! '
75
+
76
+ jekyll-tagging-0.6.0 [2014-09-03]:
77
+
78
+
79
+ * Pretty permalinks for tag pages. (Steve Valaitis)
80
+
81
+ * Added support for keywords (allenlsy)
82
+
83
+
84
+ '
46
85
  rdoc_options:
86
+ - --title
87
+ - jekyll-tagging Application documentation (v0.6.0)
47
88
  - --charset
48
89
  - UTF-8
49
90
  - --line-numbers
50
91
  - --all
51
- - --title
52
- - jekyll-tagging Application documentation (v0.5.0)
53
92
  - --main
54
93
  - ChangeLog
55
94
  require_paths:
56
95
  - lib
57
96
  required_ruby_version: !ruby/object:Gem::Requirement
58
97
  requirements:
59
- - - '>='
98
+ - - ! '>='
60
99
  - !ruby/object:Gem::Version
61
100
  version: '0'
62
101
  required_rubygems_version: !ruby/object:Gem::Requirement
63
102
  requirements:
64
- - - '>='
103
+ - - ! '>='
65
104
  - !ruby/object:Gem::Version
66
105
  version: '0'
67
106
  requirements: []
68
107
  rubyforge_project:
69
- rubygems_version: 2.0.3
108
+ rubygems_version: 2.4.1
70
109
  signing_key:
71
110
  specification_version: 4
72
111
  summary: Jekyll plugin to automatically generate a tag cloud and tag pages.