octopress-ink 1.0.0.rc.55 → 1.0.0.rc.56

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: f517835b210f170331ea8cd934bf152e3c3ad1c2
4
- data.tar.gz: ae3be19c27549ace16b73f659d18d18035da7ea2
3
+ metadata.gz: a2cd9fc670733acf85a2404920d6007bef790fc6
4
+ data.tar.gz: f1b1aa10dc93141d6a1d33015c9d489795bf3e6f
5
5
  SHA512:
6
- metadata.gz: 03d00856c6ca3b2ad4c3d95e098caeaa5ee12dfe7267efb4257f0fcc67e3fab4a1aeed9bda25390cdecb4777a791aba6018ce5650e725dd27cdceb9e96b26ee9
7
- data.tar.gz: 0257488cc68a4a887e2f44e9044e6ac8fdfd261f55a78334486f591686ddbf2dd3ed2b3cb110da7c1d9a995caaad76c9c48631cb762b27dc6fdabbf1292c78fd
6
+ metadata.gz: 1eed8707847bc8d7905fa504d057eafbf8e2da7e35e77500ec24610d3e22a1483a12cfb292407948b5f9bbff46448c1dd16c444f926a1ae47b52b2688525e5db
7
+ data.tar.gz: 89ecd6438d235a217b22372422a0e6e137986067ec0334f6b6415e6756557cdd211e8afe33ab8b146c73e39597479282bb1e2a4cc3ea0729a2f6916983a8cd6d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.0.0 RC56 - 2015-03-22
4
+ - Fix: Tag links and lists weren't being ouput
5
+ - Fix: Tags and categories would throw errors if tags were used but plugin
6
+ didn't have tag/category templates installed.
7
+ - Change: tag names:
8
+ from {% tags %} -> {% tag_links %}
9
+ from {% categories %} -> {% category_links %}
10
+
3
11
  ### 1.0.0 RC55 - 2015-03-14
4
12
  - Added `ink_watch` site configuration, allowing plugin authors to add their plugin assets directory to Jekyll's watch list.
5
13
 
data/lib/octopress-ink.rb CHANGED
@@ -241,9 +241,9 @@ end
241
241
 
242
242
  Liquid::Template.register_tag('css_asset_tag', Octopress::Ink::Tags::StylesheetTag)
243
243
  Liquid::Template.register_tag('js_asset_tag', Octopress::Ink::Tags::JavascriptTag)
244
- Liquid::Template.register_tag('categories', Octopress::Ink::Tags::CategoryTag)
244
+ Liquid::Template.register_tag('category_links', Octopress::Ink::Tags::CategoryTag)
245
245
  Liquid::Template.register_tag('category_list', Octopress::Ink::Tags::CategoryTag)
246
- Liquid::Template.register_tag('tags', Octopress::Ink::Tags::CategoryTag)
246
+ Liquid::Template.register_tag('tag_links', Octopress::Ink::Tags::CategoryTag)
247
247
  Liquid::Template.register_tag('tag_list', Octopress::Ink::Tags::CategoryTag)
248
248
  Liquid::Template.register_tag('feeds', Octopress::Ink::Tags::FeedsTag)
249
249
  Liquid::Template.register_tag('feed_updated', Octopress::Ink::Tags::FeedUpdatedTag)
@@ -27,7 +27,7 @@ module Octopress
27
27
  @categories[category]
28
28
  end
29
29
 
30
- def tag(category, lang)
30
+ def tag(tag, lang)
31
31
  tag = "#{tag}_#{page.lang}" if Octopress.multilingual? && page.lang
32
32
  @tags[tag]
33
33
  end
@@ -13,27 +13,22 @@ module Octopress
13
13
  def render(context)
14
14
  @context = context
15
15
 
16
-
17
- # If no input is passed, render in context of current page
18
- # This allows the tag to be used without input on post templates
19
- # But in a page loop it should be told passed the post item
20
- #
21
-
22
- page = context[@input] || context['page']
16
+ # Check to see if post loop is active, otherwise default to current page
17
+ page = context['post'] || context['page']
23
18
  items = page[item_name_plural]
24
19
 
25
20
  return '' if items.nil? || items.empty?
26
21
 
27
- items = items.sort.map do |item|
28
- link = item_link(page, item)
29
-
22
+ items = items.sort.map { |i| item_link(page, i) }.compact.map do |link|
30
23
  if item_list?
31
- link = %Q{<li class="#{item_type}-list-item">#{link}</li>}
24
+ link = %Q{<li class="#{item_name}-list-item">#{link}</li>}
32
25
  end
33
26
 
34
27
  link
35
28
  end
36
29
 
30
+ return '' if items.empty?
31
+
37
32
  if item_list?
38
33
  %Q{<ul class="#{item_name}-list">#{items.join}</ul>}
39
34
  else
@@ -54,9 +49,10 @@ module Octopress
54
49
  end
55
50
 
56
51
  def item_link(page, item)
57
- dir = Bootstrap.send(item_name, item, page['lang'])
58
- path = File.join(@context['site']['baseurl'], dir)
59
- %Q{<a class="#{item_name}-link" href="#{path}">#{item.capitalize}</a>}
52
+ if dir = Bootstrap.send(item_name, item, page['lang'])
53
+ path = File.join(@context['site']['baseurl'] || '', dir)
54
+ %Q{<a class="#{item_name}-link" href="#{path}">#{item.capitalize}</a>}
55
+ end
60
56
  end
61
57
  end
62
58
  end
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.0.0.rc.55"
3
+ VERSION = "1.0.0.rc.56"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-ink
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc.55
4
+ version: 1.0.0.rc.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-14 00:00:00.000000000 Z
11
+ date: 2015-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll