jekyll-tagging 0.6.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODAwNGU5NzY4ZDU1OGVkZTk2OWNkODFiY2E1Mzg1MGE0NzY1NWEwZA==
5
- data.tar.gz: !binary |-
6
- MTE4MmNkMjNhZDYzZTY3MDQ2M2JmZWEzZDg3MTdmZTIxZmU2NGU5Nw==
2
+ SHA1:
3
+ metadata.gz: 7948d773271e69433d07f936456e8b12ff09d96f
4
+ data.tar.gz: 4c80ae7b5bfc2647b41f025b0d1567e45bef99e8
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YmZmNTBjYzVjMmU4ZDJhMTU3NmNiZWU4NWJiOWVkYTVkMjQwNmYwM2FjYmJj
10
- NDBmOGM2YWU0NDNlNzJmZTg0MTI1MDkyZjFhN2FmMGM1OTM1ZGYyMGE4NDhi
11
- OGU4ZGEzZmM1ZjVhYjMzNzk1ZDAzMGVmMTZjMjU2Zjk2Y2EwMTM=
12
- data.tar.gz: !binary |-
13
- MjM5OTBjNjdjZDRhODNmNjhmMWFhOWVjYTkxZGI2NDIzN2Q4MjdmOWY5M2Ri
14
- MzM2NWEyZmI4M2YxM2ZmNmFmNjc1NGE4Zjc5NmVlYmMzNDBlZTU4MWY1MTU4
15
- ZDRmZTgzMjljNDA1OWJjNDVkMDE0MWJiZTIwNTRjYTFmM2E4OWM=
6
+ metadata.gz: ce153677ff32d72527de8c80284d2930197952abb1e13b01e31b86017732418c8b2e460b6cb6e82a5e1f2ee9b6945362dda9604786c58272ee01146eaa02fc91
7
+ data.tar.gz: 1ca5728dd26133a4c694e810a8574aadac1ee259f74b50b91750560f5a924fed6db10e55ec0cf8c825b70c7e8d4edd1a0044a2d249923e429208b658ba3e837c
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ == 1.0.0 [2015-06-10]
2
+
3
+ * Generate prettier urls for tag with whitespaces or non ASCII characters. ATTENTION: Your urls may change!
4
+ * Added support for site.config["baseurl"]. (Tsukasa ŌMOTO)
5
+ * Added trailing slashes to permalinks. (Pyry Kontio)
6
+
1
7
  == 0.6.0 [2014-09-03]
2
8
 
3
9
  * Pretty permalinks for tag pages. (Steve Valaitis)
@@ -1,6 +1,6 @@
1
1
  = jekyll-tagging
2
2
 
3
- By Arne Eilermann <mailto:eilermann@lavabit.com> and Jens Wille <mailto:jens.wille@uni-koeln.de>
3
+ By Arne Eilermann <mailto:arne@kleinerdrei.net> and Jens Wille <mailto:jens.wille@uni-koeln.de>
4
4
 
5
5
  jekyll-tagging is a Jekyll plugin, to add a tag cloud and per tag pages plus feeds to your Jekyll generated Website.
6
6
 
@@ -23,7 +23,9 @@ And in your <tt>_config.yml</tt> you have to define your layout used to generate
23
23
  tag_page_layout: tag_page
24
24
  tag_page_dir: tag
25
25
 
26
- 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.
26
+ This will look for <tt>_layouts/tag_page.html</tt>, and use it to generate tag pages into the <tt>_site/tag</tt> directory.
27
+
28
+ Now you have 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 have a <tt>tags</tt> filter which you can feed with a <tt>post</tt> or a <tt>site</tt> object to get a link list of all its tags.
27
29
 
28
30
  You can optionally define a per tag Atom/RSS feed. In your <tt>_config.yml</tt> define the following:
29
31
 
@@ -43,6 +45,8 @@ If your Jekyll <tt>permalink</tt> configuration is set to something other than <
43
45
  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>
44
46
  === Example tag page layout
45
47
 
48
+ (Save this to <tt>_layouts/tag_page.html</tt> if using the <tt>_config.yml</tt> snippet above.)
49
+
46
50
  ---
47
51
  layout: default
48
52
  ---
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  :version => Jekyll::Tagging::VERSION,
10
10
  :summary => %q{Jekyll plugin to automatically generate a tag cloud and tag pages.},
11
11
  :authors => ['Arne Eilermann', 'Jens Wille'],
12
- :email => ['eilermann@lavabit.com', 'jens.wille@uni-koeln.de'],
12
+ :email => ['arne@kleinerdrei.net', 'jens.wille@uni-koeln.de'],
13
13
  :license => %q{MIT},
14
14
  :homepage => :pattex,
15
15
  :dependencies => %w[ruby-nuggets]
@@ -1,10 +1,26 @@
1
1
  require 'nuggets/range/quantile'
2
+ require 'nuggets/i18n'
2
3
  require 'erb'
3
4
 
4
5
  module Jekyll
5
6
 
7
+ module Helpers
8
+
9
+ # call-seq:
10
+ # jekyll_tagging_slug(str) => new_str
11
+ #
12
+ # Substitutes any diacritics in _str_ with their ASCII equivalents,
13
+ # whitespaces with dashes and converts _str_ to downcase.
14
+ def jekyll_tagging_slug(str)
15
+ str.replace_diacritics.downcase.gsub(/\s/, '-')
16
+ end
17
+
18
+ end
19
+
6
20
  class Tagger < Generator
7
21
 
22
+ include Helpers
23
+
8
24
  safe true
9
25
 
10
26
  attr_accessor :site
@@ -40,7 +56,7 @@ module Jekyll
40
56
  tag_dir = site.config["tag_#{type}_dir"]
41
57
  tag_dir = File.join(tag_dir, (pretty? ? name : ''))
42
58
 
43
- page_name = "#{pretty? ? 'index' : name}#{site.layouts[data['layout']].ext}"
59
+ page_name = "#{pretty? ? 'index' : jekyll_tagging_slug(name)}#{site.layouts[data['layout']].ext}"
44
60
 
45
61
  site.pages << TagPage.new(
46
62
  site, site.source, tag_dir, page_name, data
@@ -99,6 +115,8 @@ module Jekyll
99
115
 
100
116
  module Filters
101
117
 
118
+ include Helpers
119
+
102
120
  def tag_cloud(site)
103
121
  active_tag_data.map { |tag, set|
104
122
  tag_link(tag, tag_url(tag), :class => "set-#{set}")
@@ -111,8 +129,8 @@ module Jekyll
111
129
  end
112
130
 
113
131
  def tag_url(tag, type = :page, site = Tagger.site)
114
- url = File.join('', site.config["tag_#{type}_dir"], ERB::Util.u(tag))
115
- site.permalink_style == :pretty || site.config['tag_permalink_style'] == 'pretty' ? url : url << '.html'
132
+ url = File.join('', site.config["baseurl"].to_s, site.config["tag_#{type}_dir"], ERB::Util.u(jekyll_tagging_slug(tag)))
133
+ site.permalink_style == :pretty || site.config['tag_permalink_style'] == 'pretty' ? url << '/' : url << '.html'
116
134
  end
117
135
 
118
136
  def tags(obj)
@@ -125,7 +143,7 @@ module Jekyll
125
143
  def keywords(obj)
126
144
  return '' if not obj['tags']
127
145
  tags = obj['tags'].dup
128
- tags.join(',')
146
+ tags.join(',')
129
147
  end
130
148
 
131
149
  def active_tag_data(site = Tagger.site)
@@ -4,8 +4,8 @@ module Jekyll
4
4
 
5
5
  module Version
6
6
 
7
- MAJOR = 0
8
- MINOR = 6
7
+ MAJOR = 1
8
+ MINOR = 0
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.6.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Eilermann
@@ -9,53 +9,59 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-03 00:00:00.000000000 Z
12
+ date: 2015-06-10 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
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: hen
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ! '>='
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0'
34
+ version: '0.8'
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: 0.8.1
35
38
  type: :development
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
38
41
  requirements:
39
- - - ! '>='
42
+ - - "~>"
40
43
  - !ruby/object:Gem::Version
41
- version: '0'
44
+ version: '0.8'
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 0.8.1
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: rake
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
- - - ! '>='
52
+ - - ">="
47
53
  - !ruby/object:Gem::Version
48
54
  version: '0'
49
55
  type: :development
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
52
58
  requirements:
53
- - - ! '>='
59
+ - - ">="
54
60
  - !ruby/object:Gem::Version
55
61
  version: '0'
56
62
  description: Jekyll plugin to automatically generate a tag cloud and tag pages.
57
63
  email:
58
- - eilermann@lavabit.com
64
+ - arne@kleinerdrei.net
59
65
  - jens.wille@uni-koeln.de
60
66
  executables: []
61
67
  extensions: []
@@ -71,41 +77,38 @@ homepage: http://github.com/pattex/jekyll-tagging
71
77
  licenses:
72
78
  - MIT
73
79
  metadata: {}
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
+ post_install_message: |2+
80
81
 
81
- * Added support for keywords (allenlsy)
82
+ jekyll-tagging-1.0.0 [2015-06-10]:
82
83
 
84
+ * Generate prettier urls for tag with whitespaces or non ASCII characters. ATTENTION: Your urls may change!
85
+ * Added support for site.config["baseurl"]. (Tsukasa ŌMOTO)
86
+ * Added trailing slashes to permalinks. (Pyry Kontio)
83
87
 
84
- '
85
88
  rdoc_options:
86
- - --title
87
- - jekyll-tagging Application documentation (v0.6.0)
88
- - --charset
89
+ - "--title"
90
+ - jekyll-tagging Application documentation (v1.0.0)
91
+ - "--charset"
89
92
  - UTF-8
90
- - --line-numbers
91
- - --all
92
- - --main
93
+ - "--line-numbers"
94
+ - "--all"
95
+ - "--main"
93
96
  - ChangeLog
94
97
  require_paths:
95
98
  - lib
96
99
  required_ruby_version: !ruby/object:Gem::Requirement
97
100
  requirements:
98
- - - ! '>='
101
+ - - ">="
99
102
  - !ruby/object:Gem::Version
100
103
  version: '0'
101
104
  required_rubygems_version: !ruby/object:Gem::Requirement
102
105
  requirements:
103
- - - ! '>='
106
+ - - ">="
104
107
  - !ruby/object:Gem::Version
105
108
  version: '0'
106
109
  requirements: []
107
110
  rubyforge_project:
108
- rubygems_version: 2.4.1
111
+ rubygems_version: 2.4.6
109
112
  signing_key:
110
113
  specification_version: 4
111
114
  summary: Jekyll plugin to automatically generate a tag cloud and tag pages.