jekyll 0.1.5 → 0.1.6
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 +4 -0
- data/Manifest.txt +4 -1
- data/README.textile +37 -0
- data/jekyll.gemspec +3 -3
- data/lib/jekyll.rb +8 -4
- data/lib/jekyll/{blocks.rb → tags/highlight.rb} +2 -2
- data/lib/jekyll/tags/include.rb +16 -0
- data/test/source/_includes/sig.textile +3 -0
- data/test/source/_posts/2008-12-13-include.textile +6 -0
- data/test/test_post.rb +9 -0
- data/test/test_site.rb +1 -1
- metadata +6 -3
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -6,7 +6,6 @@ bin/jekyll
|
|
6
6
|
jekyll.gemspec
|
7
7
|
lib/jekyll.rb
|
8
8
|
lib/jekyll/albino.rb
|
9
|
-
lib/jekyll/blocks.rb
|
10
9
|
lib/jekyll/converters/csv.rb
|
11
10
|
lib/jekyll/converters/mephisto.rb
|
12
11
|
lib/jekyll/convertible.rb
|
@@ -15,11 +14,15 @@ lib/jekyll/layout.rb
|
|
15
14
|
lib/jekyll/page.rb
|
16
15
|
lib/jekyll/post.rb
|
17
16
|
lib/jekyll/site.rb
|
17
|
+
lib/jekyll/tags/highlight.rb
|
18
|
+
lib/jekyll/tags/include.rb
|
18
19
|
test/helper.rb
|
20
|
+
test/source/_includes/sig.textile
|
19
21
|
test/source/_layouts/default.html
|
20
22
|
test/source/_layouts/simple.html
|
21
23
|
test/source/_posts/2008-10-18-foo-bar.textile
|
22
24
|
test/source/_posts/2008-11-21-complex.textile
|
25
|
+
test/source/_posts/2008-12-13-include.textile
|
23
26
|
test/source/css/screen.css
|
24
27
|
test/source/index.html
|
25
28
|
test/source/posts/2008-12-03-permalinked-post.textile
|
data/README.textile
CHANGED
@@ -60,6 +60,43 @@ And if you don't want to be in the proto site root to run Jekyll:
|
|
60
60
|
|
61
61
|
The autobuild feature can be used on any of the invocations.
|
62
62
|
|
63
|
+
h2. Filters, Tags, and Blocks
|
64
|
+
|
65
|
+
h3. Include Tag
|
66
|
+
|
67
|
+
If you have small page fragments that you wish to include in multiple places on your site, you can use the <code>include</code> tag.
|
68
|
+
|
69
|
+
<pre>{% include sig.textile %}</pre>
|
70
|
+
|
71
|
+
Jekyll expects all include files to be placed in an <code>_includes</code> directory at the root of your source dir. So this will embed the contents of <code>/path/to/proto/site/_includes/sig.textile</code> into the calling file.
|
72
|
+
|
73
|
+
h3. Code Highlighting Block
|
74
|
+
|
75
|
+
Jekyll has built in support for syntax highlighting of over "100
|
76
|
+
languages":http://pygments.org/languages/ via "Pygments":http://pygments.org/.
|
77
|
+
In order to take advantage of this you'll need to have Pygments installed (and
|
78
|
+
the pygmentize binary must be in your path).
|
79
|
+
|
80
|
+
To denote a code block that should be highlighted:
|
81
|
+
|
82
|
+
<pre>
|
83
|
+
{% highlight ruby %}
|
84
|
+
def foo
|
85
|
+
puts 'foo'
|
86
|
+
end
|
87
|
+
{% endhighlight %}
|
88
|
+
</pre>
|
89
|
+
|
90
|
+
The argument to <code>highlight</code> is the language identifier. To find the
|
91
|
+
appropriate identifier to use for your favorite language, look for the "short
|
92
|
+
name" on the "Lexers":http://pygments.org/docs/lexers/ page.
|
93
|
+
|
94
|
+
In order for the highlighting to show up, you'll need to include a
|
95
|
+
highlighting stylesheet. For an example stylesheet you can look at
|
96
|
+
"syntax.css":http://github.com/mojombo/tpw/tree/master/css/syntax.css. These
|
97
|
+
are the same styles as used by GitHub and you are free to use them for your
|
98
|
+
own site.
|
99
|
+
|
63
100
|
h2. Contribute
|
64
101
|
|
65
102
|
If you'd like to hack on Jekyll, grab the source from GitHub. To get
|
data/jekyll.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{jekyll}
|
3
|
-
s.version = "0.1.
|
3
|
+
s.version = "0.1.6"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Tom Preston-Werner"]
|
7
|
-
s.date = %q{2008-12-
|
7
|
+
s.date = %q{2008-12-13}
|
8
8
|
s.default_executable = %q{jekyll}
|
9
9
|
s.email = ["tom@mojombo.com"]
|
10
10
|
s.executables = ["jekyll"]
|
11
11
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt"]
|
12
|
-
s.files = ["History.txt", "Manifest.txt", "README.textile", "Rakefile", "bin/jekyll", "jekyll.gemspec", "lib/jekyll.rb", "lib/jekyll/albino.rb", "lib/jekyll/
|
12
|
+
s.files = ["History.txt", "Manifest.txt", "README.textile", "Rakefile", "bin/jekyll", "jekyll.gemspec", "lib/jekyll.rb", "lib/jekyll/albino.rb", "lib/jekyll/converters/csv.rb", "lib/jekyll/converters/mephisto.rb", "lib/jekyll/convertible.rb", "lib/jekyll/filters.rb", "lib/jekyll/layout.rb", "lib/jekyll/page.rb", "lib/jekyll/post.rb", "lib/jekyll/site.rb", "lib/jekyll/tags/highlight.rb", "lib/jekyll/tags/include.rb", "test/helper.rb", "test/source/_includes/sig.textile", "test/source/_layouts/default.html", "test/source/_layouts/simple.html", "test/source/_posts/2008-10-18-foo-bar.textile", "test/source/_posts/2008-11-21-complex.textile", "test/source/_posts/2008-12-13-include.textile", "test/source/css/screen.css", "test/source/index.html", "test/source/posts/2008-12-03-permalinked-post.textile", "test/suite.rb", "test/test_jekyll.rb", "test/test_post.rb", "test/test_site.rb"]
|
13
13
|
s.has_rdoc = true
|
14
14
|
s.rdoc_options = ["--main", "README.txt"]
|
15
15
|
s.require_paths = ["lib"]
|
data/lib/jekyll.rb
CHANGED
@@ -17,7 +17,6 @@ begin
|
|
17
17
|
rescue LoadError
|
18
18
|
puts "The rdiscount gem is required for markdown support!"
|
19
19
|
end
|
20
|
-
require 'classifier'
|
21
20
|
require 'directory_watcher'
|
22
21
|
|
23
22
|
# internal requires
|
@@ -27,20 +26,25 @@ require 'jekyll/layout'
|
|
27
26
|
require 'jekyll/page'
|
28
27
|
require 'jekyll/post'
|
29
28
|
require 'jekyll/filters'
|
30
|
-
require 'jekyll/
|
29
|
+
require 'jekyll/tags/highlight'
|
30
|
+
require 'jekyll/tags/include'
|
31
31
|
require 'jekyll/albino'
|
32
32
|
|
33
33
|
module Jekyll
|
34
|
-
VERSION = '0.1.
|
34
|
+
VERSION = '0.1.6'
|
35
35
|
|
36
36
|
class << self
|
37
|
-
attr_accessor :lsi, :pygments
|
37
|
+
attr_accessor :source, :dest, :lsi, :pygments
|
38
38
|
end
|
39
39
|
|
40
40
|
Jekyll.lsi = false
|
41
41
|
Jekyll.pygments = false
|
42
42
|
|
43
43
|
def self.process(source, dest)
|
44
|
+
require 'classifier' if Jekyll.lsi
|
45
|
+
|
46
|
+
Jekyll.source = source
|
47
|
+
Jekyll.dest = dest
|
44
48
|
Jekyll::Site.new(source, dest).process
|
45
49
|
end
|
46
50
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Jekyll
|
2
2
|
|
3
|
-
class
|
3
|
+
class HighlightBlock < Liquid::Block
|
4
4
|
include Liquid::StandardFilters
|
5
5
|
|
6
6
|
def initialize(tag_name, lang, tokens)
|
@@ -34,4 +34,4 @@ module Jekyll
|
|
34
34
|
|
35
35
|
end
|
36
36
|
|
37
|
-
Liquid::Template.register_tag('highlight', Jekyll::
|
37
|
+
Liquid::Template.register_tag('highlight', Jekyll::HighlightBlock)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Jekyll
|
2
|
+
|
3
|
+
class IncludeTag < Liquid::Tag
|
4
|
+
def initialize(tag_name, file, tokens)
|
5
|
+
super
|
6
|
+
@file = file.strip
|
7
|
+
end
|
8
|
+
|
9
|
+
def render(context)
|
10
|
+
File.read(File.join(Jekyll.source, '_includes', @file))
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
Liquid::Template.register_tag('include', Jekyll::IncludeTag)
|
data/test/test_post.rb
CHANGED
@@ -83,4 +83,13 @@ class TestPost < Test::Unit::TestCase
|
|
83
83
|
|
84
84
|
assert_equal "<<< <p>url: /2008/11/21/complex.html<br />\ndate: Fri Nov 21 00:00:00 -0800 2008<br />\nid: /2008/11/21/complex</p> >>>", p.output
|
85
85
|
end
|
86
|
+
|
87
|
+
def test_include
|
88
|
+
Jekyll.source = File.join(File.dirname(__FILE__), *%w[source])
|
89
|
+
p = Post.new(File.join(File.dirname(__FILE__), *%w[source _posts]), "2008-12-13-include.textile")
|
90
|
+
layouts = {"default" => Layout.new(File.join(File.dirname(__FILE__), *%w[source _layouts]), "simple.html")}
|
91
|
+
p.add_layout(layouts, {"site" => {"posts" => []}})
|
92
|
+
|
93
|
+
assert_equal "<<< <p>—<br />\nTom Preston-Werner<br />\ngithub.com/mojombo</p> >>>", p.output
|
94
|
+
end
|
86
95
|
end
|
data/test/test_site.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.6
|
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: 2008-12-
|
12
|
+
date: 2008-12-13 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -101,7 +101,6 @@ files:
|
|
101
101
|
- jekyll.gemspec
|
102
102
|
- lib/jekyll.rb
|
103
103
|
- lib/jekyll/albino.rb
|
104
|
-
- lib/jekyll/blocks.rb
|
105
104
|
- lib/jekyll/converters/csv.rb
|
106
105
|
- lib/jekyll/converters/mephisto.rb
|
107
106
|
- lib/jekyll/convertible.rb
|
@@ -110,11 +109,15 @@ files:
|
|
110
109
|
- lib/jekyll/page.rb
|
111
110
|
- lib/jekyll/post.rb
|
112
111
|
- lib/jekyll/site.rb
|
112
|
+
- lib/jekyll/tags/highlight.rb
|
113
|
+
- lib/jekyll/tags/include.rb
|
113
114
|
- test/helper.rb
|
115
|
+
- test/source/_includes/sig.textile
|
114
116
|
- test/source/_layouts/default.html
|
115
117
|
- test/source/_layouts/simple.html
|
116
118
|
- test/source/_posts/2008-10-18-foo-bar.textile
|
117
119
|
- test/source/_posts/2008-11-21-complex.textile
|
120
|
+
- test/source/_posts/2008-12-13-include.textile
|
118
121
|
- test/source/css/screen.css
|
119
122
|
- test/source/index.html
|
120
123
|
- test/source/posts/2008-12-03-permalinked-post.textile
|