octopress-content-for 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: 96c8d953843aef7083c7db9a31f17acd3910b549
4
- data.tar.gz: 2c50614d35eee47c8d4602e4efb004e426cfd79d
3
+ metadata.gz: 30eb3fa2dda34869a8f7f55a0091c690230d55df
4
+ data.tar.gz: d971ad2695c8633681a3b29efa8aeb7eaec1e6b5
5
5
  SHA512:
6
- metadata.gz: 2be1b43740367b84a9945e9c415c0abc12cd9a8ac82846531c70f30c394dab98ac589f9ab90160fdc2d94d3799bfebaed8d7f2febb9ac2e359eb8e0a37df2f08
7
- data.tar.gz: 4ecad08bc747142b648237ffe49466a222ad687a31d838eeed116f09a58adb7f1ec8fb78514e50a3a219893a9b4b76b4dd7391d4a1e680f2c8ed74dd56fc4ba5
6
+ metadata.gz: 0f001dacb982a5d94418d5ce991ea9937fa59f9930c2cea3fefe90660caa9854d8d5afe7f257da83940002fc5f9735d938e4e25b4e037b939fa05f34d5239a42
7
+ data.tar.gz: cb3b8d567b6518a9a562eee73231139e8b5897c610afae63170871a3b241aea57790c43e14ebe9c1fb9f8f33dfae4452202857554e0fb83b8e326b465212dd87
File without changes
@@ -2,4 +2,4 @@ language: ruby
2
2
  rvm:
3
3
  - 2.0.0
4
4
  - 1.9.3
5
- script: cd test && bundle exec clash
5
+ script: bundle exec clash test
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.0.1 - 2015-01-11
4
+
5
+ - Added support for Octopress docs
6
+ - Updated readme
7
+
3
8
  ### 1.0.1 - 2014-07-16
4
9
 
5
10
  - Fixed Octopress Ink docs plugin.
data/README.md CHANGED
@@ -8,44 +8,52 @@ Add content_for and yield tags to Jekyll with conditional rendering and in-line
8
8
 
9
9
  ## Installation
10
10
 
11
- Add this line to your application's Gemfile:
11
+ If you're using bundler add this gem to your site's Gemfile in the `:jekyll_plugins` group:
12
12
 
13
- gem 'octopress-content-for'
13
+ group :jekyll_plugins do
14
+ gem 'octopress-content-for'
15
+ end
14
16
 
15
- And then execute:
17
+ Then install the gem with Bundler
16
18
 
17
19
  $ bundle
18
20
 
19
- Or install it yourself as:
21
+ To install manually without bundler:
20
22
 
21
23
  $ gem install octopress-content-for
22
24
 
23
- Next add it to your gems list in Jekyll's `_config.yml`
25
+ Then add the gem to your Jekyll configuration.
24
26
 
25
27
  gems:
26
- - octopress-content-for
28
+ -octopress-content-for
27
29
 
28
30
  ## Usage
29
31
 
30
32
  Use it like a typical `content_for` tag.
31
33
 
32
- {% content_for awesome_content %}
33
- some content
34
- {% endcontent_for %}
34
+ ```
35
+ {% content_for awesome_content %}
36
+ some content
37
+ {% endcontent_for %}
35
38
 
36
- {% yield awesome_content %} //=> some content
39
+ {% yield awesome_content %} //=> some content
40
+ ```
37
41
 
38
42
  Use in-line filters.
39
43
 
40
- {% yield awesome_content | upcase %} //=> SOME CONTENT
44
+ ```
45
+ {% yield awesome_content | upcase %} //=> SOME CONTENT
46
+ ```
41
47
 
42
48
  Use conditional rendering in both `content_for` and `yield` tags.
43
49
 
44
- {% content_for footer unless page.footer == false %}
45
- Footer!
46
- {% endcontent_for %}
50
+ ```
51
+ {% content_for footer unless page.footer == false %}
52
+ Footer!
53
+ {% endcontent_for %}
47
54
 
48
- {% yield footer if page.footer %}
55
+ {% yield footer if page.footer %}
56
+ ```
49
57
 
50
58
  ## Contributing
51
59
 
@@ -3,6 +3,10 @@ title: "Changelog"
3
3
  permalink: /changelog/
4
4
  ---
5
5
 
6
+ ### 1.0.1 - 2014-07-16
7
+
8
+ - Fixed Octopress Ink docs plugin.
9
+
6
10
  ### 1.0.0 - 2014-07-15
7
11
 
8
12
  - Initial release
@@ -22,6 +22,11 @@ Or install it yourself as:
22
22
 
23
23
  $ gem install octopress-content-for
24
24
 
25
+ Next add it to your gems list in Jekyll's `_config.yml`
26
+
27
+ gems:
28
+ - octopress-content-for
29
+
25
30
  ## Usage
26
31
 
27
32
  Use it like a typical `content_for` tag.
@@ -1,5 +1,4 @@
1
1
  require "octopress-content-for/version"
2
- require "octopress-content-for/ink-plugin"
3
2
  require "octopress-tag-helpers"
4
3
 
5
4
  module Octopress
@@ -57,3 +56,14 @@ end
57
56
 
58
57
  Liquid::Template.register_tag('content_for', Octopress::Tags::ContentFor::Tag)
59
58
  Liquid::Template.register_tag('yield', Octopress::Tags::Yield::Tag)
59
+
60
+ if defined? Octopress::Docs
61
+ Octopress::Docs.add({
62
+ name: "Octopress Content For",
63
+ gem: "octopress-content-for",
64
+ version: Octopress::Tags::ContentFor::VERSION,
65
+ description: "A framework for writing Jekyll sites ",
66
+ path: File.expand_path(File.join(File.dirname(__FILE__), "../")),
67
+ source_url: "https://github.com/octopress/content-for"
68
+ })
69
+ end
@@ -1,7 +1,7 @@
1
1
  module Octopress
2
2
  module Tags
3
3
  module ContentFor
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,20 @@
1
+ HEAD
2
+ Testing
3
+ content_for
4
+
5
+ Testing
6
+ content_for
7
+
8
+
9
+ GOOOOOOOAL! → GOOOOOOOAL!
10
+
11
+
12
+ '' → ''
13
+
14
+
15
+ '' → ''
16
+
17
+
18
+
19
+
20
+ FEET
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-content-for
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: 2014-07-16 00:00:00.000000000 Z
11
+ date: 2015-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octopress-tag-helpers
@@ -102,6 +102,7 @@ executables: []
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
+ - ".clash.yml"
105
106
  - ".gitignore"
106
107
  - ".travis.yml"
107
108
  - CHANGELOG.md
@@ -112,17 +113,12 @@ files:
112
113
  - assets/docs/changelog.markdown
113
114
  - assets/docs/index.markdown
114
115
  - lib/octopress-content-for.rb
115
- - lib/octopress-content-for/content-for.rb
116
- - lib/octopress-content-for/ink-plugin.rb
117
116
  - lib/octopress-content-for/version.rb
118
- - lib/octopress-content-for/yield.rb
119
117
  - octopress-content-for.gemspec
120
- - test/.clash.yml
121
- - test/.gitignore
122
- - test/Gemfile
123
118
  - test/_config.yml
124
119
  - test/_expected/content_for.html
125
120
  - test/_layouts/default.html
121
+ - test/_site/content_for.html
126
122
  - test/content_for.html
127
123
  homepage: https://github.com/octopress/content-for
128
124
  licenses:
@@ -150,10 +146,8 @@ specification_version: 4
150
146
  summary: Jekyll content_for and yield tags with conditional rendering and in-line
151
147
  filters
152
148
  test_files:
153
- - test/.clash.yml
154
- - test/.gitignore
155
- - test/Gemfile
156
149
  - test/_config.yml
157
150
  - test/_expected/content_for.html
158
151
  - test/_layouts/default.html
152
+ - test/_site/content_for.html
159
153
  - test/content_for.html
@@ -1,25 +0,0 @@
1
- # Inspired by jekyll-contentblocks https://github.com/rustygeldmacher/jekyll-contentblocks
2
- #
3
- module Octopress
4
- module Tags
5
- module ContentFor
6
- class Tag < Liquid::Block
7
-
8
- def initialize(tag_name, markup, tokens)
9
- super
10
- @tag_name = tag_name
11
- @markup = markup
12
- end
13
-
14
- def render(context)
15
- return unless markup = TagHelpers::Conditional.parse(@markup, context)
16
-
17
- @block_name ||= TagHelpers::ContentFor.get_block_name(@tag_name, markup)
18
- TagHelpers::ContentFor.append_to_block(context, @block_name, super)
19
- ''
20
- end
21
- end
22
- end
23
- end
24
- end
25
-
@@ -1,11 +0,0 @@
1
- begin
2
- require 'octopress-ink'
3
-
4
- Octopress::Ink.add_plugin({
5
- name: 'Content For',
6
- assets_path: File.join(File.expand_path(File.dirname(__FILE__)), '../../assets' ),
7
- description: "Add content_for and yield tags to Jekyll with conditional rendering and in-line filters."
8
- })
9
- rescue LoadError
10
- end
11
-
@@ -1,36 +0,0 @@
1
- # Inspired by jekyll-contentblocks https://github.com/rustygeldmacher/jekyll-contentblocks
2
- #
3
- module Octopress
4
- module Tags
5
- module Yield
6
- class Tag < Liquid::Tag
7
-
8
- def initialize(tag_name, markup, tokens)
9
- if markup.strip == ''
10
- raise IOError.new "Yield failed: {% #{tag_name} #{markup}%}. Please provide a block name to yield. - Syntax: {% yield block_name %}"
11
- end
12
-
13
- super
14
- @markup = markup
15
- if markup =~ TagHelpers::Var::HAS_FILTERS
16
- markup = $1
17
- @filters = $2
18
- end
19
- @block_name = TagHelpers::ContentFor.get_block_name(tag_name, markup)
20
- end
21
-
22
- def render(context)
23
- return unless markup = TagHelpers::Conditional.parse(@markup, context)
24
- content = TagHelpers::ContentFor.render(context, @block_name)
25
-
26
- unless content.nil? || @filters.nil?
27
- content = TagHelpers::Var.render_filters(content, @filters, context)
28
- end
29
-
30
- content
31
- end
32
- end
33
- end
34
- end
35
- end
36
-
@@ -1 +0,0 @@
1
- _site
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'octopress-content-for', path: '../'
4
- gem 'pry-debugger'
5
- gem 'clash'