jekyll 0.4.1 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jekyll might be problematic. Click here for more details.
- data/History.txt +31 -1
- data/README.textile +23 -457
- data/Rakefile +91 -0
- data/VERSION.yml +2 -2
- data/bin/jekyll +61 -57
- data/lib/jekyll.rb +48 -32
- data/lib/jekyll/albino.rb +13 -7
- data/lib/jekyll/converters/mephisto.rb +8 -8
- data/lib/jekyll/converters/mt.rb +8 -8
- data/lib/jekyll/converters/textpattern.rb +4 -4
- data/lib/jekyll/converters/typo.rb +8 -8
- data/lib/jekyll/converters/wordpress.rb +1 -2
- data/lib/jekyll/convertible.rb +33 -22
- data/lib/jekyll/core_ext.rb +5 -5
- data/lib/jekyll/filters.rb +15 -7
- data/lib/jekyll/layout.rb +9 -6
- data/lib/jekyll/page.rb +13 -10
- data/lib/jekyll/post.rb +108 -39
- data/lib/jekyll/site.rb +121 -51
- data/lib/jekyll/tags/highlight.rb +12 -9
- data/lib/jekyll/tags/include.rb +5 -5
- data/test/helper.rb +20 -6
- data/test/source/_posts/2008-02-02-not-published.textile +8 -0
- data/test/source/_posts/2008-02-02-published.textile +8 -0
- data/test/source/_posts/2009-01-27-array-categories.textile +10 -0
- data/test/source/_posts/2009-01-27-categories.textile +7 -0
- data/test/source/_posts/2009-01-27-category.textile +7 -0
- data/test/source/_posts/2009-03-12-hash-#1.markdown +6 -0
- data/test/test_filters.rb +39 -27
- data/test/test_generated_site.rb +32 -16
- data/test/test_post.rb +258 -102
- data/test/test_site.rb +60 -28
- data/test/test_tags.rb +103 -18
- metadata +25 -70
- data/test/dest/2008/10/18/foo-bar.html +0 -28
- data/test/dest/2008/11/21/complex.html +0 -29
- data/test/dest/2008/12/13/include.html +0 -30
- data/test/dest/_posts/2008-10-18-foo-bar.html +0 -28
- data/test/dest/_posts/2008-11-21-complex.html +0 -29
- data/test/dest/_posts/2008-12-03-permalinked-post.html +0 -2
- data/test/dest/_posts/2008-12-13-include.html +0 -30
- data/test/dest/category/2008/09/23/categories.html +0 -27
- data/test/dest/category/_posts/2008-9-23-categories.html +0 -27
- data/test/dest/css/screen.css +0 -76
- data/test/dest/foo/2008/12/12/topical-post.html +0 -28
- data/test/dest/foo/_posts/bar/2008-12-12-topical-post.html +0 -28
- data/test/dest/index.html +0 -60
- data/test/dest/my_category/permalinked-post +0 -2
- data/test/dest/z_category/2008/09/23/categories.html +0 -27
- data/test/dest/z_category/_posts/2008-9-23-categories.html +0 -27
- data/test/test_jekyll.rb +0 -0
data/test/test_tags.rb
CHANGED
@@ -1,31 +1,116 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/helper'
|
2
2
|
|
3
3
|
class TestTags < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def
|
6
|
-
|
4
|
+
|
5
|
+
def create_post(content, override = {}, markdown = true)
|
6
|
+
stub(Jekyll).configuration do
|
7
|
+
Jekyll::DEFAULTS.merge({'pygments' => true}).merge(override)
|
8
|
+
end
|
9
|
+
site = Site.new(Jekyll.configuration)
|
10
|
+
info = { :filters => [Jekyll::Filters], :registers => { :site => site } }
|
11
|
+
|
12
|
+
if markdown
|
13
|
+
payload = {"content_type" => "markdown"}
|
14
|
+
else
|
15
|
+
payload = {"content_type" => "textile"}
|
16
|
+
end
|
17
|
+
|
18
|
+
@result = Liquid::Template.parse(content).render(payload, info)
|
19
|
+
|
20
|
+
if markdown
|
21
|
+
@result = site.markdown(@result)
|
22
|
+
else
|
23
|
+
@result = site.textile(@result)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def fill_post(code, override = {})
|
28
|
+
content = <<CONTENT
|
7
29
|
---
|
8
|
-
layout: post
|
9
30
|
title: This is a test
|
10
|
-
|
11
31
|
---
|
32
|
+
|
12
33
|
This document results in a markdown error with maruku
|
13
|
-
{% highlight ruby %}
|
14
|
-
puts "hi"
|
15
34
|
|
16
|
-
|
35
|
+
{% highlight text %}
|
36
|
+
#{code}
|
17
37
|
{% endhighlight %}
|
38
|
+
CONTENT
|
39
|
+
create_post(content, override)
|
40
|
+
end
|
41
|
+
|
42
|
+
context "post content has highlight tag" do
|
43
|
+
setup do
|
44
|
+
fill_post("test")
|
45
|
+
end
|
46
|
+
|
47
|
+
should "not cause a markdown error" do
|
48
|
+
assert_no_match /markdown\-html\-error/, @result
|
49
|
+
end
|
50
|
+
|
51
|
+
should "render markdown with pygments line handling" do
|
52
|
+
assert_match %{<pre>test\n</pre>}, @result
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "post content has highlight tag with UTF character" do
|
57
|
+
setup do
|
58
|
+
fill_post("Æ")
|
59
|
+
end
|
18
60
|
|
61
|
+
should "render markdown with pygments line handling" do
|
62
|
+
assert_match %{<pre>Æ\n</pre>}, @result
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
context "simple post with markdown and pre tags" do
|
67
|
+
setup do
|
68
|
+
@content = <<CONTENT
|
69
|
+
---
|
70
|
+
title: Maruku vs. RDiscount
|
71
|
+
---
|
72
|
+
|
73
|
+
_FIGHT!_
|
74
|
+
|
75
|
+
{% highlight ruby %}
|
76
|
+
puts "3..2..1.."
|
77
|
+
{% endhighlight %}
|
78
|
+
|
79
|
+
*FINISH HIM*
|
19
80
|
CONTENT
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
81
|
+
end
|
82
|
+
|
83
|
+
context "using Textile" do
|
84
|
+
setup do
|
85
|
+
create_post(@content, {}, false)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Broken in RedCloth 4.1.9
|
89
|
+
should "not textilize highlight block" do
|
90
|
+
assert_no_match %r{3\.\.2\.\.1\.\."</span><br />}, @result
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
context "using Maruku" do
|
95
|
+
setup do
|
96
|
+
create_post(@content)
|
97
|
+
end
|
98
|
+
|
99
|
+
should "parse correctly" do
|
100
|
+
assert_match %r{<em>FIGHT!</em>}, @result
|
101
|
+
assert_match %r{<em>FINISH HIM</em>}, @result
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
context "using RDiscount" do
|
106
|
+
setup do
|
107
|
+
create_post(@content, 'markdown' => 'rdiscount')
|
108
|
+
end
|
109
|
+
|
110
|
+
should "parse correctly" do
|
111
|
+
assert_match %r{<em>FIGHT!</em>}, @result
|
112
|
+
assert_match %r{<em>FINISH HIM</em>}, @result
|
113
|
+
end
|
114
|
+
end
|
29
115
|
end
|
30
|
-
|
31
116
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-05-06 00:00:00 -04:00
|
13
13
|
default_executable: jekyll
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -18,9 +18,9 @@ dependencies:
|
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- - "
|
21
|
+
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 4.0
|
23
|
+
version: 4.1.0
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: liquid
|
@@ -78,16 +78,16 @@ executables:
|
|
78
78
|
- jekyll
|
79
79
|
extensions: []
|
80
80
|
|
81
|
-
extra_rdoc_files:
|
82
|
-
|
81
|
+
extra_rdoc_files:
|
82
|
+
- README.textile
|
83
83
|
files:
|
84
84
|
- History.txt
|
85
85
|
- README.textile
|
86
|
+
- Rakefile
|
86
87
|
- VERSION.yml
|
87
88
|
- bin/jekyll
|
88
|
-
- lib/jekyll
|
89
|
+
- lib/jekyll.rb
|
89
90
|
- lib/jekyll/albino.rb
|
90
|
-
- lib/jekyll/converters
|
91
91
|
- lib/jekyll/converters/csv.rb
|
92
92
|
- lib/jekyll/converters/mephisto.rb
|
93
93
|
- lib/jekyll/converters/mt.rb
|
@@ -101,90 +101,39 @@ files:
|
|
101
101
|
- lib/jekyll/page.rb
|
102
102
|
- lib/jekyll/post.rb
|
103
103
|
- lib/jekyll/site.rb
|
104
|
-
- lib/jekyll/tags
|
105
104
|
- lib/jekyll/tags/highlight.rb
|
106
105
|
- lib/jekyll/tags/include.rb
|
107
|
-
- lib/jekyll.rb
|
108
|
-
- test/dest
|
109
|
-
- test/dest/2008
|
110
|
-
- test/dest/2008/10
|
111
|
-
- test/dest/2008/10/18
|
112
|
-
- test/dest/2008/10/18/foo-bar.html
|
113
|
-
- test/dest/2008/11
|
114
|
-
- test/dest/2008/11/21
|
115
|
-
- test/dest/2008/11/21/complex.html
|
116
|
-
- test/dest/2008/12
|
117
|
-
- test/dest/2008/12/13
|
118
|
-
- test/dest/2008/12/13/include.html
|
119
|
-
- test/dest/_posts
|
120
|
-
- test/dest/_posts/2008-10-18-foo-bar.html
|
121
|
-
- test/dest/_posts/2008-11-21-complex.html
|
122
|
-
- test/dest/_posts/2008-12-03-permalinked-post.html
|
123
|
-
- test/dest/_posts/2008-12-13-include.html
|
124
|
-
- test/dest/category
|
125
|
-
- test/dest/category/2008
|
126
|
-
- test/dest/category/2008/09
|
127
|
-
- test/dest/category/2008/09/23
|
128
|
-
- test/dest/category/2008/09/23/categories.html
|
129
|
-
- test/dest/category/_posts
|
130
|
-
- test/dest/category/_posts/2008-9-23-categories.html
|
131
|
-
- test/dest/css
|
132
|
-
- test/dest/css/screen.css
|
133
|
-
- test/dest/foo
|
134
|
-
- test/dest/foo/2008
|
135
|
-
- test/dest/foo/2008/12
|
136
|
-
- test/dest/foo/2008/12/12
|
137
|
-
- test/dest/foo/2008/12/12/topical-post.html
|
138
|
-
- test/dest/foo/_posts
|
139
|
-
- test/dest/foo/_posts/bar
|
140
|
-
- test/dest/foo/_posts/bar/2008-12-12-topical-post.html
|
141
|
-
- test/dest/index.html
|
142
|
-
- test/dest/my_category
|
143
|
-
- test/dest/my_category/permalinked-post
|
144
|
-
- test/dest/z_category
|
145
|
-
- test/dest/z_category/2008
|
146
|
-
- test/dest/z_category/2008/09
|
147
|
-
- test/dest/z_category/2008/09/23
|
148
|
-
- test/dest/z_category/2008/09/23/categories.html
|
149
|
-
- test/dest/z_category/_posts
|
150
|
-
- test/dest/z_category/_posts/2008-9-23-categories.html
|
151
106
|
- test/helper.rb
|
152
|
-
- test/source
|
153
|
-
- test/source/_includes
|
154
107
|
- test/source/_includes/sig.markdown
|
155
|
-
- test/source/_layouts
|
156
108
|
- test/source/_layouts/default.html
|
157
109
|
- test/source/_layouts/simple.html
|
158
|
-
- test/source/_posts
|
110
|
+
- test/source/_posts/2008-02-02-not-published.textile
|
111
|
+
- test/source/_posts/2008-02-02-published.textile
|
159
112
|
- test/source/_posts/2008-10-18-foo-bar.textile
|
160
113
|
- test/source/_posts/2008-11-21-complex.textile
|
161
114
|
- test/source/_posts/2008-12-03-permalinked-post.textile
|
162
115
|
- test/source/_posts/2008-12-13-include.markdown
|
163
|
-
- test/source/
|
164
|
-
- test/source/
|
116
|
+
- test/source/_posts/2009-01-27-array-categories.textile
|
117
|
+
- test/source/_posts/2009-01-27-categories.textile
|
118
|
+
- test/source/_posts/2009-01-27-category.textile
|
119
|
+
- test/source/_posts/2009-03-12-hash-#1.markdown
|
165
120
|
- test/source/category/_posts/2008-9-23-categories.textile
|
166
|
-
- test/source/css
|
167
121
|
- test/source/css/screen.css
|
168
|
-
- test/source/foo
|
169
|
-
- test/source/foo/_posts
|
170
|
-
- test/source/foo/_posts/bar
|
171
122
|
- test/source/foo/_posts/bar/2008-12-12-topical-post.textile
|
172
123
|
- test/source/index.html
|
173
|
-
- test/source/z_category
|
174
|
-
- test/source/z_category/_posts
|
175
124
|
- test/source/z_category/_posts/2008-9-23-categories.textile
|
176
125
|
- test/suite.rb
|
177
126
|
- test/test_filters.rb
|
178
127
|
- test/test_generated_site.rb
|
179
|
-
- test/test_jekyll.rb
|
180
128
|
- test/test_post.rb
|
181
129
|
- test/test_site.rb
|
182
130
|
- test/test_tags.rb
|
183
131
|
has_rdoc: true
|
184
132
|
homepage: http://github.com/mojombo/jekyll
|
133
|
+
licenses: []
|
134
|
+
|
185
135
|
post_install_message:
|
186
136
|
rdoc_options:
|
187
|
-
- --inline-source
|
188
137
|
- --charset=UTF-8
|
189
138
|
require_paths:
|
190
139
|
- lib
|
@@ -203,9 +152,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
152
|
requirements: []
|
204
153
|
|
205
154
|
rubyforge_project: jekyll
|
206
|
-
rubygems_version: 1.3.
|
155
|
+
rubygems_version: 1.3.5
|
207
156
|
signing_key:
|
208
157
|
specification_version: 2
|
209
158
|
summary: Jekyll is a simple, blog aware, static site generator.
|
210
|
-
test_files:
|
211
|
-
|
159
|
+
test_files:
|
160
|
+
- test/helper.rb
|
161
|
+
- test/suite.rb
|
162
|
+
- test/test_filters.rb
|
163
|
+
- test/test_generated_site.rb
|
164
|
+
- test/test_post.rb
|
165
|
+
- test/test_site.rb
|
166
|
+
- test/test_tags.rb
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
7
|
-
<title>Foo Bar</title>
|
8
|
-
<meta name="author" content="<%= @page.author %>" />
|
9
|
-
|
10
|
-
<!-- CodeRay syntax highlighting CSS -->
|
11
|
-
<link rel="stylesheet" href="/css/coderay.css" type="text/css" />
|
12
|
-
|
13
|
-
<!-- Homepage CSS -->
|
14
|
-
<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen, projection" />
|
15
|
-
</head>
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<div class="site">
|
19
|
-
<div class="title">
|
20
|
-
Tom Preston-Werner
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<h1>Foo Bar</h1>
|
24
|
-
<p>Best <strong>post</strong> ever</p>
|
25
|
-
</div>
|
26
|
-
|
27
|
-
</body>
|
28
|
-
</html>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
7
|
-
<title>Complex</title>
|
8
|
-
<meta name="author" content="<%= @page.author %>" />
|
9
|
-
|
10
|
-
<!-- CodeRay syntax highlighting CSS -->
|
11
|
-
<link rel="stylesheet" href="/css/coderay.css" type="text/css" />
|
12
|
-
|
13
|
-
<!-- Homepage CSS -->
|
14
|
-
<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen, projection" />
|
15
|
-
</head>
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<div class="site">
|
19
|
-
<div class="title">
|
20
|
-
Tom Preston-Werner
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<p>url: /2008/11/21/complex.html<br />
|
24
|
-
date: Fri Nov 21 00:00:00 -0800 2008<br />
|
25
|
-
id: /2008/11/21/complex</p>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
</body>
|
29
|
-
</html>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
7
|
-
<title>Include</title>
|
8
|
-
<meta name="author" content="<%= @page.author %>" />
|
9
|
-
|
10
|
-
<!-- CodeRay syntax highlighting CSS -->
|
11
|
-
<link rel="stylesheet" href="/css/coderay.css" type="text/css" />
|
12
|
-
|
13
|
-
<!-- Homepage CSS -->
|
14
|
-
<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen, projection" />
|
15
|
-
</head>
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<div class="site">
|
19
|
-
<div class="title">
|
20
|
-
Tom Preston-Werner
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<hr />
|
24
|
-
<p>Tom Preston-Werner github.com/mojombo</p>
|
25
|
-
|
26
|
-
<p>This <em>is</em> cool</p>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
</body>
|
30
|
-
</html>
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
7
|
-
<title>Foo Bar</title>
|
8
|
-
<meta name="author" content="<%= @page.author %>" />
|
9
|
-
|
10
|
-
<!-- CodeRay syntax highlighting CSS -->
|
11
|
-
<link rel="stylesheet" href="/css/coderay.css" type="text/css" />
|
12
|
-
|
13
|
-
<!-- Homepage CSS -->
|
14
|
-
<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen, projection" />
|
15
|
-
</head>
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<div class="site">
|
19
|
-
<div class="title">
|
20
|
-
Tom Preston-Werner
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<h1>Foo Bar</h1>
|
24
|
-
<p>Best <strong>post</strong> ever</p>
|
25
|
-
</div>
|
26
|
-
|
27
|
-
</body>
|
28
|
-
</html>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
7
|
-
<title>Complex</title>
|
8
|
-
<meta name="author" content="<%= @page.author %>" />
|
9
|
-
|
10
|
-
<!-- CodeRay syntax highlighting CSS -->
|
11
|
-
<link rel="stylesheet" href="/css/coderay.css" type="text/css" />
|
12
|
-
|
13
|
-
<!-- Homepage CSS -->
|
14
|
-
<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen, projection" />
|
15
|
-
</head>
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<div class="site">
|
19
|
-
<div class="title">
|
20
|
-
Tom Preston-Werner
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<p>url: <br />
|
24
|
-
date: <br />
|
25
|
-
id:</p>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
</body>
|
29
|
-
</html>
|