octopress-include-tag 1.0.1 → 1.0.2

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: b4954f100ac82ffeaa68b4ff940a4db6e4d7fdda
4
- data.tar.gz: 3b7cda8eb2a96b83ed779afba4191f03c427cfd9
3
+ metadata.gz: 633c2dc4ba2a2835fb054b66e518befc3eba5864
4
+ data.tar.gz: e765d981dd4e650b5a8732fc11433761cdac9279
5
5
  SHA512:
6
- metadata.gz: d5c8fff17abf554eb57e1c04cadbd6bb313e2939c02c4f5649e290e8dbd45a4add336b1d168979ec5a229f1c090f572ae4b32f110cf2cf0d221ebacc7154f954
7
- data.tar.gz: 492295efca19695edc9b8eef9e8c60139a3180785ab3cbcb801b33de08837f06f83edaf0b41835f1c03f15553d0cda9e00363fe2851f42d877dd906e3d8385a8
6
+ metadata.gz: 2d5b7598cdc4adad0880a782f8652b76d5b7f2bbcc547e56364cd445e2e0bb207db355a5c2bcb263eb1c297555056cbf6fa8c54c8609f1ad0f877d190ab656b7
7
+ data.tar.gz: d802e466a57468f4cb359407be4a0067a8f247906aeb4159bb6849465cf2295291d284b12a6378d98c7e7248756cf600456fb30c8a426279b8661cf09bbc24dd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.0.2 - 2015-01-11
4
+
5
+ - Updated module naming, Readme, and Octopress docs integration
6
+
3
7
  ### 1.0.1 - 2014-07-14
4
8
 
5
9
  - Added support for Octopress docs.
data/README.md CHANGED
@@ -6,51 +6,64 @@ This replaces Jekyll's include tag and adds support for conditional rendering, i
6
6
  [![Gem Version](http://img.shields.io/gem/v/octopress-include-tag.svg)](https://rubygems.org/gems/octopress-include-tag)
7
7
  [![License](http://img.shields.io/:license-mit-blue.svg)](http://octopress.mit-license.org)
8
8
 
9
+
9
10
  ## Installation
10
11
 
11
- Add this line to your application's Gemfile:
12
+ If you're using bundler add this gem to your site's Gemfile in the `:jekyll_plugins` group:
12
13
 
13
- gem 'octopress-include-tag'
14
+ group :jekyll_plugins do
15
+ gem 'octopress-include-tag'
16
+ end
14
17
 
15
- And then execute:
18
+ Then install the gem with Bundler
16
19
 
17
20
  $ bundle
18
21
 
19
- Or install it yourself as:
22
+ To install manually without bundler:
20
23
 
21
24
  $ gem install octopress-include-tag
22
25
 
23
- Next add it to your gems list in Jekyll's `_config.yml`
26
+ Then add the gem to your Jekyll configuration.
24
27
 
25
28
  gems:
26
- - octopress-include-tag
29
+ -octopress-include-tag
27
30
 
28
31
  ## Usage
29
32
 
30
33
  Use this just like the regular Jekyll include tag.
31
34
 
32
- {% include foo.html %} // renders _includes/foo.html
33
- {% include foo.html happy="yep" %} // samea as above but {{ include.happy }} == "yep"
35
+ ```
36
+ {% include foo.html %} // renders _includes/foo.html
37
+ {% include foo.html happy="yep" %} // samea as above but {{ include.happy }} == "yep"
38
+ ```
34
39
 
35
40
  Include partials stored as a variable.
36
41
 
37
- {% assign post_sidebar = "post_sidebar.html" %}
38
- {% include post_sidebar %} // renders _includes/post_sidebar.html
42
+ ```
43
+ {% assign post_sidebar = "post_sidebar.html" %}
44
+ {% include post_sidebar %} // renders _includes/post_sidebar.html
45
+ ```
39
46
 
40
47
  Include partials conditionally, using `if`, `unless` and ternary logic.
41
48
 
42
- {% include sidebar.html if site.theme.sidebar %}
43
- {% include comments.html unless page.comments == false %}
44
- {% include (post ? post_sidebar : page_sidebar) %}
49
+ ```
50
+ {% include sidebar.html if site.theme.sidebar %}
51
+ {% include comments.html unless page.comments == false %}
52
+ {% include (post ? post_sidebar : page_sidebar) %}
53
+ ```
45
54
 
46
55
  Filter included partials.
47
56
 
48
- {% include foo.html %} //=> Yo, what's up
49
- {% include foo.html | upcase %} //=> YO, WHAT'S UP
57
+ ```
58
+ {% include foo.html %} //=> Yo, what's up
59
+ {% include foo.html | upcase %} //=> YO, WHAT'S UP
60
+ ```
50
61
 
51
62
  Yes, it can handle a complex combination of features… but can you?
52
63
 
53
- {% include (post ? post_sidebar : page_sidebar) | smart_quotes unless site.theme.sidebar == false %}
64
+ ```
65
+ {% include (post ? post_sidebar : page_sidebar) | smart_quotes unless site.theme.sidebar == false %}
66
+ ```
54
67
 
55
68
  ### Include partials with an Octopress Ink plugin.
56
69
 
@@ -76,23 +89,28 @@ render partials for the RSS feed.
76
89
  </entry>
77
90
  {% endfor %}
78
91
 
79
-
80
92
  If you want to make a change to the `entry.xml` partial, you could create your own version at `_plugins/feeds/includes/entry.xml`.
81
93
  Now whenever `{% include feeds:entry.xml %}` is called, the include tag will use *your* local partial instead of the plugin's partial.
82
94
 
83
95
  Note: To make overriding partials easier, you can copy all of a plugin's partials to your local override path with the Octopress Ink command:
84
96
 
85
- octopress ink copy [plugin-slug] [options]
97
+ ```
98
+ $ octopress ink copy [plugin-slug] [options]
99
+ ```
86
100
 
87
101
  To copy all includes from the feeds plugin, you'd run:
88
102
 
89
- octopress ink copy feeds --includes
103
+ ```
104
+ $ octopress ink copy feeds --includes
105
+ ```
90
106
 
91
107
  This will copy all of the partials from octopress-feeds to `_plugins/feeds/includes/`. Modify any of the partials, and delete those that you want to be read from the plugin.
92
108
 
93
109
  To list all partials from a plugin, run:
94
110
 
95
- octopress ink list [plugin-slug] --includes
111
+ ```
112
+ $ octopress ink list [plugin-slug] --includes
113
+ ```
96
114
 
97
115
  Note: When a plugin is updated, your local partials may be out of date, but will still override the plugin's partials. Be sure to watch changelogs and try to keep your modifications current.
98
116
 
@@ -1,7 +1,7 @@
1
1
  module Octopress
2
2
  module Tags
3
- module IncludeTag
4
- VERSION = "1.0.1"
3
+ module Include
4
+ VERSION = "1.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -4,7 +4,7 @@ require "jekyll"
4
4
 
5
5
  module Octopress
6
6
  module Tags
7
- module IncludeTag
7
+ module Include
8
8
  class Tag < Liquid::Tag
9
9
  PLUGIN_SYNTAX = /(.+?):(\S+)/
10
10
 
@@ -61,11 +61,13 @@ module Octopress
61
61
  end
62
62
  end
63
63
 
64
- Liquid::Template.register_tag('include', Octopress::Tags::IncludeTag::Tag)
64
+ Liquid::Template.register_tag('include', Octopress::Tags::Include::Tag)
65
65
 
66
66
  if defined? Octopress::Docs
67
67
  Octopress::Docs.add({
68
68
  name: "Octopress Include Tag",
69
+ gem: "octopress-include-tag",
70
+ version: Octopress::Tags::Include::VERSION,
69
71
  description: "Replaces Jekyll's include tag and adds conditional rendering, in-line filters and Octopress Ink features.",
70
72
  path: File.expand_path(File.join(File.dirname(__FILE__), "../")),
71
73
  type: "tag",
@@ -5,7 +5,7 @@ require 'octopress-include-tag/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "octopress-include-tag"
8
- spec.version = Octopress::Tags::IncludeTag::VERSION
8
+ spec.version = Octopress::Tags::Include::VERSION
9
9
  spec.authors = ["Brandon Mathis"]
10
10
  spec.email = ["brandon@imathis.com"]
11
11
  spec.summary = %q{A powerful include tag with conditions, filters and more}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-include-tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
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-01-02 00:00:00.000000000 Z
11
+ date: 2015-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octopress-tag-helpers