jekyll 0.3.0 → 0.4.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 +25 -0
- data/README.textile +93 -23
- data/VERSION.yml +4 -0
- data/bin/jekyll +9 -0
- data/lib/jekyll.rb +7 -3
- data/lib/jekyll/converters/mephisto.rb +56 -1
- data/lib/jekyll/converters/mt.rb +1 -1
- data/lib/jekyll/converters/textpattern.rb +50 -0
- data/lib/jekyll/converters/typo.rb +49 -0
- data/lib/jekyll/converters/wordpress.rb +9 -8
- data/lib/jekyll/convertible.rb +14 -3
- data/lib/jekyll/filters.rb +18 -3
- data/lib/jekyll/post.rb +9 -5
- data/lib/jekyll/site.rb +45 -28
- data/lib/jekyll/tags/highlight.rb +20 -4
- data/lib/jekyll/tags/include.rb +6 -2
- data/test/dest/2008/10/18/foo-bar.html +28 -0
- data/test/dest/2008/11/21/complex.html +29 -0
- data/test/dest/2008/12/13/include.html +30 -0
- data/test/dest/_posts/2008-10-18-foo-bar.html +28 -0
- data/test/dest/_posts/2008-11-21-complex.html +29 -0
- data/test/dest/_posts/2008-12-03-permalinked-post.html +2 -0
- data/test/dest/_posts/2008-12-13-include.html +30 -0
- data/test/dest/category/2008/09/23/categories.html +27 -0
- data/test/dest/category/_posts/2008-9-23-categories.html +27 -0
- data/test/dest/css/screen.css +76 -0
- data/test/dest/foo/2008/12/12/topical-post.html +28 -0
- data/test/dest/foo/_posts/bar/2008-12-12-topical-post.html +28 -0
- data/test/dest/index.html +60 -0
- data/test/dest/my_category/permalinked-post +2 -0
- data/test/dest/z_category/2008/09/23/categories.html +27 -0
- data/test/dest/z_category/_posts/2008-9-23-categories.html +27 -0
- data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
- data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
- data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
- data/test/test_filters.rb +37 -0
- data/test/test_generated_site.rb +1 -0
- data/test/test_post.rb +15 -1
- data/test/test_site.rb +5 -2
- data/test/test_tags.rb +31 -0
- metadata +85 -37
- data/Manifest.txt +0 -36
- data/Rakefile +0 -24
- data/jekyll.gemspec +0 -51
@@ -0,0 +1,30 @@
|
|
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>
|
@@ -0,0 +1,27 @@
|
|
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>Categories</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>Categories <em>should</em> work</p>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
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>Categories</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>Categories <em>should</em> work</p>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,76 @@
|
|
1
|
+
/*****************************************************************************/
|
2
|
+
/*
|
3
|
+
/* Common
|
4
|
+
/*
|
5
|
+
/*****************************************************************************/
|
6
|
+
|
7
|
+
/* Global Reset */
|
8
|
+
|
9
|
+
* {
|
10
|
+
margin: 0;
|
11
|
+
padding: 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
html, body {
|
15
|
+
height: 100%;
|
16
|
+
}
|
17
|
+
|
18
|
+
body {
|
19
|
+
background-color: white;
|
20
|
+
font: 13.34px helvetica, arial, clean, sans-serif;
|
21
|
+
*font-size: small;
|
22
|
+
text-align: center;
|
23
|
+
}
|
24
|
+
|
25
|
+
h1, h2, h3, h4, h5, h6 {
|
26
|
+
font-size: 100%;
|
27
|
+
}
|
28
|
+
|
29
|
+
h1 {
|
30
|
+
margin-bottom: 1em;
|
31
|
+
}
|
32
|
+
|
33
|
+
p {
|
34
|
+
margin: 1em 0;
|
35
|
+
}
|
36
|
+
|
37
|
+
a {
|
38
|
+
color: #00a;
|
39
|
+
}
|
40
|
+
|
41
|
+
a:hover {
|
42
|
+
color: black;
|
43
|
+
}
|
44
|
+
|
45
|
+
a:visited {
|
46
|
+
color: #a0a;
|
47
|
+
}
|
48
|
+
|
49
|
+
table {
|
50
|
+
font-size: inherit;
|
51
|
+
font: 100%;
|
52
|
+
}
|
53
|
+
|
54
|
+
/*****************************************************************************/
|
55
|
+
/*
|
56
|
+
/* Site
|
57
|
+
/*
|
58
|
+
/*****************************************************************************/
|
59
|
+
|
60
|
+
.site {
|
61
|
+
font-size: 110%;
|
62
|
+
text-align: justify;
|
63
|
+
width: 40em;
|
64
|
+
margin: 3em auto 2em auto;
|
65
|
+
line-height: 1.5em;
|
66
|
+
}
|
67
|
+
|
68
|
+
.title {
|
69
|
+
color: #a00;
|
70
|
+
font-weight: bold;
|
71
|
+
margin-bottom: 2em;
|
72
|
+
}
|
73
|
+
|
74
|
+
.site .meta {
|
75
|
+
color: #aaa;
|
76
|
+
}
|
@@ -0,0 +1,28 @@
|
|
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>Topical Post</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>Topical Post</h1>
|
24
|
+
<p>This post has a topic.</p>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,28 @@
|
|
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>Topical Post</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>Topical Post</h1>
|
24
|
+
<p>This post has a topic.</p>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,60 @@
|
|
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>Tom Preston-Werner</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
|
+
|
24
|
+
h1. Welcome to my site
|
25
|
+
|
26
|
+
h2. Please read our 7 Posts
|
27
|
+
|
28
|
+
<ul>
|
29
|
+
|
30
|
+
<li>Sat Dec 13 00:00:00 -0800 2008 <a href="/2008/12/13/include.html">Include</a></li>
|
31
|
+
|
32
|
+
<li>Fri Dec 12 00:00:00 -0800 2008 <a href="/foo/2008/12/12/topical-post.html">Topical Post</a></li>
|
33
|
+
|
34
|
+
<li>Wed Dec 03 00:00:00 -0800 2008 <a href="my_category/permalinked-post">Post with Permalink</a></li>
|
35
|
+
|
36
|
+
<li>Fri Nov 21 00:00:00 -0800 2008 <a href="/2008/11/21/complex.html">Complex</a></li>
|
37
|
+
|
38
|
+
<li>Sat Oct 18 00:00:00 -0700 2008 <a href="/2008/10/18/foo-bar.html">Foo Bar</a></li>
|
39
|
+
|
40
|
+
<li>Tue Sep 23 00:00:00 -0700 2008 <a href="/z_category/2008/09/23/categories.html">Categories</a></li>
|
41
|
+
|
42
|
+
<li>Tue Sep 23 00:00:00 -0700 2008 <a href="/category/2008/09/23/categories.html">Categories</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
|
46
|
+
|
47
|
+
<div id="first_post">
|
48
|
+
<h1>Include</h1>
|
49
|
+
<div>
|
50
|
+
<hr />
|
51
|
+
<p>Tom Preston-Werner github.com/mojombo</p>
|
52
|
+
|
53
|
+
<p>This <em>is</em> cool</p>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
</body>
|
60
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
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>Categories</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>Categories <em>should</em> work. Even if ordered after index.</p>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
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>Categories</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>Categories <em>should</em> work. Even if ordered after index.</p>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/helper'
|
2
|
+
|
3
|
+
class TestFilters < Test::Unit::TestCase
|
4
|
+
|
5
|
+
class JekyllFilter
|
6
|
+
include Jekyll::Filters
|
7
|
+
end
|
8
|
+
|
9
|
+
def setup
|
10
|
+
@filter = JekyllFilter.new
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_array_to_sentence_string_with_no_args
|
14
|
+
assert_equal "", @filter.array_to_sentence_string([])
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_array_to_sentence_string_with_one_arg
|
18
|
+
assert_equal "1", @filter.array_to_sentence_string([1])
|
19
|
+
assert_equal "chunky", @filter.array_to_sentence_string(["chunky"])
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_array_to_sentence_string_with_two_args
|
23
|
+
assert_equal "1 and 2", @filter.array_to_sentence_string([1, 2])
|
24
|
+
assert_equal "chunky and bacon", @filter.array_to_sentence_string(["chunky", "bacon"])
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_array_to_sentence_string_with_multiple_args
|
28
|
+
assert_equal "1, 2, 3, and 4", @filter.array_to_sentence_string([1, 2, 3, 4])
|
29
|
+
assert_equal "chunky, bacon, bits, and pieces", @filter.array_to_sentence_string(["chunky", "bacon", "bits", "pieces"])
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_xml_escape_with_ampersands
|
33
|
+
assert_equal "AT&T", @filter.xml_escape("AT&T")
|
34
|
+
assert_equal "<code>command &lt;filename&gt;</code>", @filter.xml_escape("<code>command <filename></code>")
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
data/test/test_generated_site.rb
CHANGED
data/test/test_post.rb
CHANGED
@@ -43,7 +43,15 @@ class TestPost < Test::Unit::TestCase
|
|
43
43
|
p.process("2008-12-03-permalinked-post.textile")
|
44
44
|
p.read_yaml(File.join(File.dirname(__FILE__), *%w[source _posts]), "2008-12-03-permalinked-post.textile")
|
45
45
|
|
46
|
-
assert_equal "my_category", p.dir
|
46
|
+
assert_equal "my_category/", p.dir
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_url_respects_permalink
|
50
|
+
p = Post.allocate
|
51
|
+
p.process("2008-12-03-permalinked-post.textile")
|
52
|
+
p.read_yaml(File.join(File.dirname(__FILE__), *%w[source _posts]), "2008-12-03-permalinked-post.textile")
|
53
|
+
|
54
|
+
assert_equal "my_category/permalinked-post", p.url
|
47
55
|
end
|
48
56
|
|
49
57
|
def test_read_yaml
|
@@ -88,6 +96,12 @@ class TestPost < Test::Unit::TestCase
|
|
88
96
|
assert_equal "<<< <p>url: /2008/11/21/complex.html<br />\ndate: #{Time.parse("2008-11-21")}<br />\nid: /2008/11/21/complex</p> >>>", p.output
|
89
97
|
end
|
90
98
|
|
99
|
+
def test_categories_and_topics
|
100
|
+
p = Post.new(File.join(File.dirname(__FILE__), *%w[source]), 'foo', 'bar/2008-12-12-topical-post.textile')
|
101
|
+
assert_equal ['foo'], p.categories
|
102
|
+
assert_equal ['bar'], p.topics
|
103
|
+
end
|
104
|
+
|
91
105
|
def test_include
|
92
106
|
Jekyll.source = File.join(File.dirname(__FILE__), *%w[source])
|
93
107
|
p = Post.new(File.join(File.dirname(__FILE__), *%w[source]), '', "2008-12-13-include.markdown")
|