octopress-render-tag 1.0.5 → 1.0.6

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: 539fdbbce7d742530f4527ea56e83d272c6a6a70
4
- data.tar.gz: fc1e28edc69bc187034360140cc56cfb6f11befb
3
+ metadata.gz: 9b7bc14072b5f104f39c3dd26be2e5d59278cd4c
4
+ data.tar.gz: bfc0cb50384db2d1d1a6fd694fe913ac7ee873f3
5
5
  SHA512:
6
- metadata.gz: 2b794024673a8277a446b31fbf257569c9661d7ff94974d8e798f6d9441b0478ed010a639be23f9e6c8458746d908ecea3f47435a9b56f8993871afe577bce7b
7
- data.tar.gz: 83739823b0d0d02106acc3abd0aeda46ea411a5217b4b542b8f809e8d4fe717e0223bce689d1511a82f8ff243e3fe8ebba9768f0691638dc672ba33f152378ea
6
+ metadata.gz: a5b72cb799bdfc06984ac7e99d40a7b28d3ac1cc530252cc7d961ca78b22152aa694462b6c23d170f233b94cfacd56a0fcedb4fc9efca2ac68db80fd3ff808c5
7
+ data.tar.gz: aad1715ddd874322f113948c97f8539a7de1c527bdd2f711000ffeb5cb73286b441b098c4e17ff27dda1033e10593573977b8345095caa6f25897344a83ed381
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.0.6 - 2015-01-11
4
+
5
+ - Minor docs updates
6
+ - Module name change
7
+
3
8
  ### 1.0.5 - 2015-01-03
4
9
 
5
10
  - Removed duplicate docs.
data/README.md CHANGED
@@ -8,22 +8,24 @@ Use the render tag to embed files directly from the file system. This tag also s
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-render-tag'
13
+ group :jekyll_plugins do
14
+ gem 'octopress-render-tag'
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-render-tag
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-render-tag
28
+ -octopress-render-tag
27
29
 
28
30
  ## Usage
29
31
 
@@ -31,50 +33,64 @@ Next add it to your gems list in Jekyll's `_config.yml`
31
33
 
32
34
  By default paths passed to the render tag are relative to the site source directory.
33
35
 
34
- {% render _file.html %} // relative to site source
36
+ ```
37
+ {% render _file.html %} // relative to site source
38
+ ```
35
39
 
36
40
  Relative paths like these are relative to the current file.
37
41
 
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
+ <!-- title:"A page in the directory 'some_dir'" -->
43
+ ```
44
+ {% render ./_file.html %} // renders some_dir/_file.html
45
+ {% render ../other_dir/_file.html %} // renders other_dir/_file.html
46
+ ```
42
47
 
43
48
  You can even render files relative to system paths, however, remember that these renders will only work if
44
49
  the site is rendered on your system. If these files move, your site will fail to build.
45
50
 
46
- {% render /_file.html %} // relative to system root
47
- {% render ~/_file.html %} // relative to system user
51
+ ```
52
+ {% render /_file.html %} // relative to system root
53
+ {% render ~/_file.html %} // relative to system user
54
+ ```
48
55
 
49
56
  ### Render tag features
50
57
 
51
58
  Render partials stored as a variable.
52
59
 
53
- // If a page has the YAML front-matter
54
- // theme: _post_themes/blue.css
60
+ ```html
61
+ ---
62
+ theme: _post_themes/feature.css
63
+ ---
55
64
 
56
- <style>{% render page.theme %}</style>
65
+ <style>{% render page.theme %}</style>
66
+ ```
57
67
 
58
68
  Render partials conditionally, using `if`, `unless` and ternary logic.
59
69
 
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) %}
70
+ ```
71
+ {% render ./post-footer.html if post.footer %}
72
+ {% render ./page-footer.html unless page.footer == false %}
73
+ {% render (post ? ./post-footer.html : ./page-footer.html) %}
74
+ ```
63
75
 
64
76
  Filter partials.
65
77
 
66
- {% render ./foo.html %} //=> Yo, what's up
67
- {% render ./foo.html | upcase %} //=> YO, WHAT'S UP
78
+ ```
79
+ {% render ./foo.html %} //=> Yo, what's up
80
+ {% render ./foo.html | upcase %} //=> YO, WHAT'S UP
81
+ ```
68
82
 
69
- Automatic template processing.
83
+ Automatic template processing. Markdown and textile files can be embedded in HTML files.
70
84
 
71
- // in some_page.html
72
- {% render _test.md %} // outputs markdown rendered to HTML
85
+ ```
86
+ {% render _test.md %} // renders as html
87
+ ```
73
88
 
74
- Avoid template processing.
89
+ If you want, you can disable template processing.
75
90
 
76
- // in some_page.html
77
- {% render raw _test.md %} // Markdown is not processed
91
+ ```
92
+ {% render raw _test.md %} // Markdown is not processed
93
+ ```
78
94
 
79
95
  ## Contributing
80
96
 
@@ -5,7 +5,7 @@ require "jekyll"
5
5
 
6
6
  module Octopress
7
7
  module Tags
8
- module RenderTag
8
+ module Render
9
9
  class Tag < Liquid::Tag
10
10
  SYNTAX = /(\S+)(.+)?/
11
11
 
@@ -95,8 +95,8 @@ module Octopress
95
95
  end
96
96
  end
97
97
 
98
- Liquid::Template.register_tag('render', Octopress::Tags::RenderTag::Tag)
99
- Liquid::Template.register_tag('render_partial', Octopress::Tags::RenderTag::Tag)
98
+ Liquid::Template.register_tag('render', Octopress::Tags::Render::Tag)
99
+ Liquid::Template.register_tag('render_partial', Octopress::Tags::Render::Tag)
100
100
 
101
101
  if defined? Octopress::Docs
102
102
  Octopress::Docs.add({
@@ -105,6 +105,6 @@ if defined? Octopress::Docs
105
105
  path: File.expand_path(File.join(File.dirname(__FILE__), "../")),
106
106
  type: "tag",
107
107
  source_url: "https://github.com/octopress/render-tag",
108
- version: Octopress::Tags::RenderTag::VERSION
108
+ version: Octopress::Tags::Render::VERSION
109
109
  })
110
110
  end
@@ -1,7 +1,7 @@
1
1
  module Octopress
2
2
  module Tags
3
- module RenderTag
4
- VERSION = "1.0.5"
3
+ module Render
4
+ VERSION = "1.0.6"
5
5
  end
6
6
  end
7
7
  end
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.5
4
+ version: 1.0.6
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-03 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