octopress-render-tag 1.0.0 → 1.0.1

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: 7521e258881ed59759ca566d6312602228b9c452
4
- data.tar.gz: 06101030a8b925ce0ecd587ccea896b0799d36fb
3
+ metadata.gz: f5acb80c4b4040ad60856fe838fba69f5e388efe
4
+ data.tar.gz: 44c850848b3cc59a01b1e663c0ab59c54d39dbce
5
5
  SHA512:
6
- metadata.gz: 61ab181f1c0b9d656cc1bd9eebf1f33f2d0cd6940a2c78a940cd291bd798a378e32b60f19423b45fd820d6f104287fc6edc587de45f83c460f5c85c92cbd4b4d
7
- data.tar.gz: 5f2a6f6ea3e6368e8f7b4e2074f77cc304b84ca834ff67f572ff4223b41ca1e2e121199c6ba88d6172be8ab00771e31586f25efe6110148bb7e80dcb533e882d
6
+ metadata.gz: 336a53eb17bb47428a0dfe24c2636d40e2f04f360698f1d63023c56cc4dcee4b62af1daa425eb749d7ec51165eb1dccea54e91c94d615ab6a06ee9a890b769ac
7
+ data.tar.gz: a62e352490234cb07e981fa050539228e0e8da1422b073dc7609bf0588efc3a7b560682e1306a07399a93291991ec55fd4f62a7a890fd3d542fa6b853717724e
data/.travis.yml CHANGED
@@ -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 ruby test.rb
5
+ script: cd test && bundle exec clash
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ ### 1.0.1 - 2014-06-29
4
+
5
+ - Added docs for Octopress Ink
6
+
7
+ ### 1.0.0 - 2014-06-29
8
+
9
+ - Initial release
10
+
data/README.md CHANGED
@@ -1,12 +1,16 @@
1
- # OctopressRenderTag
1
+ # Octopress Render Tag
2
2
 
3
- TODO: Write a gem description
3
+ Use the render tag to embed files directly from the file system. This tag also supports conditional rendering, in-line filters.
4
+
5
+ [![Build Status](https://travis-ci.org/octopress/render-tag.svg)](https://travis-ci.org/octopress/render-tag)
6
+ [![Gem Version](http://img.shields.io/gem/v/octopress-render-tag.svg)](https://rubygems.org/gems/octopress-render-tag)
7
+ [![License](http://img.shields.io/:license-mit-blue.svg)](http://octopress.mit-license.org)
4
8
 
5
9
  ## Installation
6
10
 
7
11
  Add this line to your application's Gemfile:
8
12
 
9
- gem 'octopress_render_tag'
13
+ gem 'octopress-render-tag'
10
14
 
11
15
  And then execute:
12
16
 
@@ -14,15 +18,67 @@ And then execute:
14
18
 
15
19
  Or install it yourself as:
16
20
 
17
- $ gem install octopress_render_tag
21
+ $ gem install octopress-render-tag
22
+
23
+ Next add it to your gems list in Jekyll's `_config.yml`
24
+
25
+ gems:
26
+ - octopress-render-tag
18
27
 
19
28
  ## Usage
20
29
 
21
- TODO: Write usage instructions here
30
+ ### How file paths work
31
+
32
+ By default paths passed to the render tag are relative to the site source directory.
33
+
34
+ {% render _file.html %} // relative to site source
35
+
36
+ Relative paths like these are relative to the current file.
37
+
38
+ // some_page/test.html
39
+
40
+ {% render ./_file.html %} // renders some_page/_file.html
41
+ {% render ../other_page/_file.html %} // renders other_page/_file.html
42
+
43
+ You can even render files relative to system paths, however, remember that these renders will only work if
44
+ the site is rendered on your system. If these files move, your site will fail to build.
45
+
46
+ {% render /_file.html %} // relative to system root
47
+ {% render ~/_file.html %} // relative to system user
48
+
49
+ ### Render tag features
50
+
51
+ Render partials stored as a variable.
52
+
53
+ // If a page has the YAML front-matter
54
+ // theme: _post_themes/blue.css
55
+
56
+ <style>{% render page.theme %}</style>
57
+
58
+ Render partials conditionally, using `if`, `unless` and ternary logic.
59
+
60
+ {% render ./post-footer.html if post.footer %}
61
+ {% render ./page-footer.html unless page.footer == false %}
62
+ {% render (post ? ./post-footer.html : ./page-footer.html) %}
63
+
64
+ Filter partials.
65
+
66
+ {% render ./foo.html %} //=> Yo, what's up
67
+ {% render ./foo.html | upcase %} //=> YO, WHAT'S UP
68
+
69
+ Automatic template processing.
70
+
71
+ // in some_page.html
72
+ {% render _test.md %} // outputs markdown rendered to HTML
73
+
74
+ Avoid template processing.
75
+
76
+ // in some_page.html
77
+ {% render raw _test.md %} // Markdown is not processed
22
78
 
23
79
  ## Contributing
24
80
 
25
- 1. Fork it ( https://github.com/[my-github-username]/octopress_render_tag/fork )
81
+ 1. Fork it ( https://github.com/octopress/render-tag/fork )
26
82
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
83
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
84
  4. Push to the branch (`git push origin my-new-feature`)
data/Rakefile CHANGED
@@ -1,2 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+ require "octopress-ink"
3
+
4
+ desc "Copy Readme and Changelog into docs"
5
+ task :update_docs do
6
+ Octopress::Ink.copy_doc 'README.md', 'assets/docs/index.markdown'
7
+ Octopress::Ink.copy_doc 'CHANGELOG.md', 'assets/docs/changelog.markdown', '/changelog/'
8
+ end
2
9
 
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: "Changelog"
3
+ permalink: /changelog/
4
+ ---
5
+
6
+ ### 1.0.1 - 2014-06-29
7
+
8
+ - Added docs for Octopress Ink
9
+
10
+ ### 1.0.0 - 2014-06-29
11
+
12
+ - Initial release
13
+
@@ -0,0 +1,87 @@
1
+ ---
2
+ title: "Octopress Render Tag"
3
+ ---
4
+
5
+ Use the render tag to embed files directly from the file system. This tag also supports conditional rendering, in-line filters.
6
+
7
+ [![Build Status](https://travis-ci.org/octopress/render-tag.svg)](https://travis-ci.org/octopress/render-tag)
8
+ [![Gem Version](http://img.shields.io/gem/v/octopress-render-tag.svg)](https://rubygems.org/gems/octopress-render-tag)
9
+ [![License](http://img.shields.io/:license-mit-blue.svg)](http://octopress.mit-license.org)
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ gem 'octopress-render-tag'
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install octopress-render-tag
24
+
25
+ Next add it to your gems list in Jekyll's `_config.yml`
26
+
27
+ gems:
28
+ - octopress-render-tag
29
+
30
+ ## Usage
31
+
32
+ ### How file paths work
33
+
34
+ By default paths passed to the render tag are relative to the site source directory.
35
+
36
+ {% render _file.html %} // relative to site source
37
+
38
+ Relative paths like these are relative to the current file.
39
+
40
+ // some_page/test.html
41
+
42
+ {% render ./_file.html %} // renders some_page/_file.html
43
+ {% render ../other_page/_file.html %} // renders other_page/_file.html
44
+
45
+ You can even render files relative to system paths, however, remember that these renders will only work if
46
+ the site is rendered on your system. If these files move, your site will fail to build.
47
+
48
+ {% render /_file.html %} // relative to system root
49
+ {% render ~/_file.html %} // relative to system user
50
+
51
+ ### Render tag features
52
+
53
+ Render partials stored as a variable.
54
+
55
+ // If a page has the YAML front-matter
56
+ // theme: _post_themes/blue.css
57
+
58
+ <style>{% render page.theme %}</style>
59
+
60
+ Render partials conditionally, using `if`, `unless` and ternary logic.
61
+
62
+ {% render ./post-footer.html if post.footer %}
63
+ {% render ./page-footer.html unless page.footer == false %}
64
+ {% render (post ? ./post-footer.html : ./page-footer.html) %}
65
+
66
+ Filter partials.
67
+
68
+ {% render ./foo.html %} //=> Yo, what's up
69
+ {% render ./foo.html | upcase %} //=> YO, WHAT'S UP
70
+
71
+ Automatic template processing.
72
+
73
+ // in some_page.html
74
+ {% render _test.md %} // outputs markdown rendered to HTML
75
+
76
+ Avoid template processing.
77
+
78
+ // in some_page.html
79
+ {% render raw _test.md %} // Markdown is not processed
80
+
81
+ ## Contributing
82
+
83
+ 1. Fork it ( https://github.com/octopress/render-tag/fork )
84
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
85
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
86
+ 4. Push to the branch (`git push origin my-new-feature`)
87
+ 5. Create a new Pull Request
@@ -1,5 +1,6 @@
1
1
  require "octopress-render-tag/version"
2
2
  require "octopress-tag-helpers"
3
+ require "octopress-render-tag/ink-plugin"
3
4
  require "jekyll-page-hooks"
4
5
  require "jekyll"
5
6
 
File without changes
@@ -1,7 +1,7 @@
1
1
  module Octopress
2
2
  module Tags
3
3
  module RenderTag
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
6
6
  end
7
7
  end
@@ -22,6 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency "jekyll-page-hooks", "~> 1.0"
23
23
  spec.add_runtime_dependency "jekyll", "~> 2.0"
24
24
 
25
+ spec.add_development_dependency "clash"
25
26
  spec.add_development_dependency "bundler", "~> 1.6"
26
27
  spec.add_development_dependency "rake"
28
+ spec.add_development_dependency "octopress-ink"
27
29
  end
data/test/.clash.yml ADDED
@@ -0,0 +1,2 @@
1
+ build: true
2
+ compare: "_site, _expected"
data/test/Gemfile CHANGED
@@ -1,3 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'octopress-render-tag', path: '../'
4
+ gem 'clash'
data/test/_config.yml CHANGED
@@ -9,12 +9,10 @@ github_username: jekyll
9
9
 
10
10
  exclude:
11
11
  - Gemfile*
12
- - expected.html
13
- - test.rb
12
+ - expected/
14
13
 
15
14
  render_test: kittens
16
15
  # Build settings
17
16
  markdown: kramdown
18
- permalink: pretty
19
17
  gems:
20
18
  - octopress-render-tag
File without changes
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Brandon Mathis
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,4 @@
1
+ ---
2
+ permalink: license.html
3
+ ---
4
+ {% render ../../LICENSE.txt %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-render-tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
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-06-29 00:00:00.000000000 Z
11
+ date: 2014-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octopress-tag-helpers
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: clash
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,20 @@ dependencies:
80
94
  - - ">="
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: octopress-ink
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  description: Render files inline on any Jekyll page or post
84
112
  email:
85
113
  - brandon@imathis.com
@@ -89,22 +117,28 @@ extra_rdoc_files: []
89
117
  files:
90
118
  - ".gitignore"
91
119
  - ".travis.yml"
120
+ - CHANGELOG.md
92
121
  - Gemfile
93
122
  - LICENSE.txt
94
123
  - README.md
95
124
  - Rakefile
125
+ - assets/docs/changelog.markdown
126
+ - assets/docs/index.markdown
96
127
  - lib/octopress-render-tag.rb
128
+ - lib/octopress-render-tag/ink-plugin.rb
97
129
  - lib/octopress-render-tag/version.rb
98
130
  - octopress-render-tag.gemspec
131
+ - test/.clash.yml
99
132
  - test/.gitignore
100
133
  - test/Gemfile
101
134
  - test/_config.yml
135
+ - test/_expected/index.html
136
+ - test/_expected/license.html
102
137
  - test/_test_render.md
103
- - test/expected.html
104
138
  - test/index.html
105
- - test/test.rb
106
139
  - test/test_render/_f.html
107
140
  - test/test_render/_var.html
141
+ - test/test_render/license.html
108
142
  homepage: https://github.com/octopress/render-tag
109
143
  licenses:
110
144
  - MIT
@@ -130,12 +164,14 @@ signing_key:
130
164
  specification_version: 4
131
165
  summary: Render files inline on any Jekyll page or post
132
166
  test_files:
167
+ - test/.clash.yml
133
168
  - test/.gitignore
134
169
  - test/Gemfile
135
170
  - test/_config.yml
171
+ - test/_expected/index.html
172
+ - test/_expected/license.html
136
173
  - test/_test_render.md
137
- - test/expected.html
138
174
  - test/index.html
139
- - test/test.rb
140
175
  - test/test_render/_f.html
141
176
  - test/test_render/_var.html
177
+ - test/test_render/license.html
data/test/test.rb DELETED
@@ -1,11 +0,0 @@
1
- require 'colorator'
2
- has_failed = false
3
-
4
- system('rm -rf _site')
5
- system('jekyll build')
6
-
7
- diff = `diff _site/index.html expected.html`
8
-
9
- abort "Failed with diff: #{diff}" if diff.size > 0
10
-
11
- puts "passed".green