merged 'mojombo/master' at 'v0.5.6'
This commit is contained in:
commit
2a7b1cbd98
23
History.txt
23
History.txt
|
@ -1,10 +1,25 @@
|
||||||
== edge
|
== Edge
|
||||||
* Enhancements
|
* Enhancements
|
||||||
* added support for extensions [issue #100]
|
* added support for extensions [issue #100]
|
||||||
|
|
||||||
|
== 0.5.6 / 2010-01-08
|
||||||
* Bug Fixes
|
* Bug Fixes
|
||||||
* changed tests to require redcloth >= 4.2.1 [issue #92]
|
* Require redcloth >= 4.2.1 in tests (#92)
|
||||||
* fixed pagination when number of pages is an exact multiple of max per page [issue #78]
|
* Don't break on triple dashes in yaml frontmatter (#93)
|
||||||
* fixed rendering order of site artifacts [issue #71]
|
* Minor Enhancements
|
||||||
|
* Allow .mkd as markdown extension
|
||||||
|
* Use $stdout/err instead of constants (#99)
|
||||||
|
* Properly wrap code blocks (#91)
|
||||||
|
* Add javascript mime type for webrick (#98)
|
||||||
|
|
||||||
|
== 0.5.5 / 2010-01-08
|
||||||
|
* Bug Fixes
|
||||||
|
* Fix pagination % 0 bug (#78)
|
||||||
|
* Ensure all posts are processed first (#71)
|
||||||
|
|
||||||
|
== NOTE
|
||||||
|
* After this point I will no longer be giving credit in the history;
|
||||||
|
that is what the commit log is for.
|
||||||
|
|
||||||
== 0.5.4 / 2009-08-23
|
== 0.5.4 / 2009-08-23
|
||||||
* Bug Fixes
|
* Bug Fixes
|
||||||
|
|
|
@ -20,14 +20,21 @@ h2. Diving In
|
||||||
* Customize the "Permalinks":http://wiki.github.com/mojombo/jekyll/permalinks your posts are generated with
|
* Customize the "Permalinks":http://wiki.github.com/mojombo/jekyll/permalinks your posts are generated with
|
||||||
* Use the built-in "Liquid Extensions":http://wiki.github.com/mojombo/jekyll/liquid-extensions to make your life easier
|
* Use the built-in "Liquid Extensions":http://wiki.github.com/mojombo/jekyll/liquid-extensions to make your life easier
|
||||||
|
|
||||||
h2. Dependencies
|
h2. Runtime Dependencies
|
||||||
|
|
||||||
* RedCloth: Textile support
|
* RedCloth: Textile support (Ruby)
|
||||||
* Liquid: Templating system
|
* Liquid: Templating system (Ruby)
|
||||||
* Classifier: Generating related posts
|
* Classifier: Generating related posts (Ruby)
|
||||||
* Maruku: Default markdown engine
|
* Maruku: Default markdown engine (Ruby)
|
||||||
* Directory Watcher: Auto-regeneration of sites
|
* Directory Watcher: Auto-regeneration of sites (Ruby)
|
||||||
* Open4: Talking to pygments for syntax highlighting
|
* Open4: Talking to pygments for syntax highlighting (Ruby)
|
||||||
|
* Pygments: Syntax highlighting (Python)
|
||||||
|
|
||||||
|
h2. Developer Dependencies
|
||||||
|
|
||||||
|
* Shoulda: Test framework (Ruby)
|
||||||
|
* RR: Mocking (Ruby)
|
||||||
|
* RedGreen: Nicer test output (Ruby)
|
||||||
|
|
||||||
h2. License
|
h2. License
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
:patch: 4
|
|
||||||
:major: 0
|
|
||||||
:minor: 5
|
:minor: 5
|
||||||
|
:patch: 6
|
||||||
|
:build:
|
||||||
|
:major: 0
|
||||||
|
|
|
@ -145,9 +145,13 @@ if options['server']
|
||||||
|
|
||||||
FileUtils.mkdir_p(destination)
|
FileUtils.mkdir_p(destination)
|
||||||
|
|
||||||
|
mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
|
||||||
|
mime_types.store 'js', 'application/javascript'
|
||||||
|
|
||||||
s = HTTPServer.new(
|
s = HTTPServer.new(
|
||||||
:Port => options['server_port'],
|
:Port => options['server_port'],
|
||||||
:DocumentRoot => destination
|
:DocumentRoot => destination,
|
||||||
|
:MimeTypes => mime_types
|
||||||
)
|
)
|
||||||
t = Thread.new {
|
t = Thread.new {
|
||||||
s.start
|
s.start
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# Generated by jeweler
|
# Generated by jeweler
|
||||||
# DO NOT EDIT THIS FILE DIRECTLY
|
# DO NOT EDIT THIS FILE DIRECTLY
|
||||||
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
# Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = %q{krisb-jekyll}
|
s.name = %q{jekyll}
|
||||||
s.version = "0.5.4"
|
s.version = "0.5.6"
|
||||||
|
|
||||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||||
s.authors = ["Tom Preston-Werner", "Kris Brown"]
|
s.authors = ["Tom Preston-Werner"]
|
||||||
s.date = %q{2010-01-05}
|
s.date = %q{2010-01-08}
|
||||||
s.default_executable = %q{jekyll}
|
s.default_executable = %q{jekyll}
|
||||||
s.description = %q{Jekyll is a simple, blog aware, static site generator.}
|
s.description = %q{Jekyll is a simple, blog aware, static site generator.}
|
||||||
s.email = %q{kris@kris.me.uk}
|
s.email = %q{kris@kris.me.uk}
|
||||||
|
@ -50,6 +50,7 @@ Gem::Specification.new do |s|
|
||||||
"lib/jekyll/pager.rb",
|
"lib/jekyll/pager.rb",
|
||||||
"lib/jekyll/post.rb",
|
"lib/jekyll/post.rb",
|
||||||
"lib/jekyll/site.rb",
|
"lib/jekyll/site.rb",
|
||||||
|
"lib/jekyll/static_file.rb",
|
||||||
"lib/jekyll/tags/highlight.rb",
|
"lib/jekyll/tags/highlight.rb",
|
||||||
"lib/jekyll/tags/include.rb",
|
"lib/jekyll/tags/include.rb",
|
||||||
"test/helper.rb",
|
"test/helper.rb",
|
||||||
|
@ -70,6 +71,7 @@ Gem::Specification.new do |s|
|
||||||
"test/source/_posts/2009-05-18-tags.textile",
|
"test/source/_posts/2009-05-18-tags.textile",
|
||||||
"test/source/_posts/2009-06-22-empty-yaml.textile",
|
"test/source/_posts/2009-06-22-empty-yaml.textile",
|
||||||
"test/source/_posts/2009-06-22-no-yaml.textile",
|
"test/source/_posts/2009-06-22-no-yaml.textile",
|
||||||
|
"test/source/_posts/2010-01-08-triple-dash.markdown",
|
||||||
"test/source/about.html",
|
"test/source/about.html",
|
||||||
"test/source/category/_posts/2008-9-23-categories.textile",
|
"test/source/category/_posts/2008-9-23-categories.textile",
|
||||||
"test/source/contacts.html",
|
"test/source/contacts.html",
|
|
@ -69,10 +69,10 @@ module Jekyll
|
||||||
begin
|
begin
|
||||||
config = YAML.load_file(config_file)
|
config = YAML.load_file(config_file)
|
||||||
raise "Invalid configuration - #{config_file}" if !config.is_a?(Hash)
|
raise "Invalid configuration - #{config_file}" if !config.is_a?(Hash)
|
||||||
STDOUT.puts "Configuration from #{config_file}"
|
$stdout.puts "Configuration from #{config_file}"
|
||||||
rescue => err
|
rescue => err
|
||||||
STDERR.puts "WARNING: Could not read configuration. Using defaults (and options)."
|
$stderr.puts "WARNING: Could not read configuration. Using defaults (and options)."
|
||||||
STDERR.puts "\t" + err.to_s
|
$stderr.puts "\t" + err.to_s
|
||||||
config = {}
|
config = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ module Jekyll
|
||||||
def read_yaml(base, name)
|
def read_yaml(base, name)
|
||||||
self.content = File.read(File.join(base, name))
|
self.content = File.read(File.join(base, name))
|
||||||
|
|
||||||
if self.content =~ /^(---\s*\n.*?\n?)(---.*?\n)/m
|
if self.content =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m
|
||||||
self.content = self.content[($1.size + $2.size)..-1]
|
self.content = self.content[($1.size + $2.size)..-1]
|
||||||
|
|
||||||
self.data = YAML.load($1)
|
self.data = YAML.load($1)
|
||||||
|
@ -53,7 +53,7 @@ module Jekyll
|
||||||
case self.ext[1..-1]
|
case self.ext[1..-1]
|
||||||
when /textile/i
|
when /textile/i
|
||||||
return 'textile'
|
return 'textile'
|
||||||
when /markdown/i, /mkdn/i, /md/i
|
when /markdown/i, /mkdn/i, /md/i, /mkd/i
|
||||||
return 'markdown'
|
return 'markdown'
|
||||||
end
|
end
|
||||||
return 'unknown'
|
return 'unknown'
|
||||||
|
|
|
@ -30,12 +30,11 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_pygments(context, code)
|
def render_pygments(context, code)
|
||||||
|
output = add_code_tags(Albino.new(code, @lang).to_s(@options), @lang)
|
||||||
if context["content_type"] == "markdown"
|
if context["content_type"] == "markdown"
|
||||||
return "\n" + Albino.new(code, @lang).to_s(@options) + "\n"
|
return "\n" + output + "\n"
|
||||||
elsif context["content_type"] == "textile"
|
elsif context["content_type"] == "textile"
|
||||||
return "<notextile>" + Albino.new(code, @lang).to_s(@options) + "</notextile>"
|
return "<notextile>" + output + "</notextile>"
|
||||||
else
|
|
||||||
return Albino.new(code, @lang).to_s(@options)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -49,6 +48,13 @@ module Jekyll
|
||||||
</div>
|
</div>
|
||||||
HTML
|
HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def add_code_tags(code, lang)
|
||||||
|
# Add nested <code> tags to code blocks
|
||||||
|
code = code.sub(/<pre>/,'<pre><code class="' + lang + '">')
|
||||||
|
code = code.sub(/<\/pre>/,"</code></pre>")
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Foo --- Bar
|
||||||
|
---
|
||||||
|
|
||||||
|
Triple the fun!
|
|
@ -8,21 +8,21 @@ class TestConfiguration < Test::Unit::TestCase
|
||||||
|
|
||||||
should "fire warning with no _config.yml" do
|
should "fire warning with no _config.yml" do
|
||||||
mock(YAML).load_file(@path) { raise "No such file or directory - #{@path}" }
|
mock(YAML).load_file(@path) { raise "No such file or directory - #{@path}" }
|
||||||
mock(STDERR).puts("WARNING: Could not read configuration. Using defaults (and options).")
|
mock($stderr).puts("WARNING: Could not read configuration. Using defaults (and options).")
|
||||||
mock(STDERR).puts("\tNo such file or directory - #{@path}")
|
mock($stderr).puts("\tNo such file or directory - #{@path}")
|
||||||
assert_equal Jekyll::DEFAULTS, Jekyll.configuration({})
|
assert_equal Jekyll::DEFAULTS, Jekyll.configuration({})
|
||||||
end
|
end
|
||||||
|
|
||||||
should "load configuration as hash" do
|
should "load configuration as hash" do
|
||||||
mock(YAML).load_file(@path) { Hash.new }
|
mock(YAML).load_file(@path) { Hash.new }
|
||||||
mock(STDOUT).puts("Configuration from #{@path}")
|
mock($stdout).puts("Configuration from #{@path}")
|
||||||
assert_equal Jekyll::DEFAULTS, Jekyll.configuration({})
|
assert_equal Jekyll::DEFAULTS, Jekyll.configuration({})
|
||||||
end
|
end
|
||||||
|
|
||||||
should "fire warning with bad config" do
|
should "fire warning with bad config" do
|
||||||
mock(YAML).load_file(@path) { Array.new }
|
mock(YAML).load_file(@path) { Array.new }
|
||||||
mock(STDERR).puts("WARNING: Could not read configuration. Using defaults (and options).")
|
mock($stderr).puts("WARNING: Could not read configuration. Using defaults (and options).")
|
||||||
mock(STDERR).puts("\tInvalid configuration - #{@path}")
|
mock($stderr).puts("\tInvalid configuration - #{@path}")
|
||||||
assert_equal Jekyll::DEFAULTS, Jekyll.configuration({})
|
assert_equal Jekyll::DEFAULTS, Jekyll.configuration({})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "ensure post count is as expected" do
|
should "ensure post count is as expected" do
|
||||||
assert_equal 17, @site.posts.size
|
assert_equal 18, @site.posts.size
|
||||||
end
|
end
|
||||||
|
|
||||||
should "insert site.posts into the index" do
|
should "insert site.posts into the index" do
|
||||||
|
|
|
@ -78,7 +78,19 @@ class TestPost < Test::Unit::TestCase
|
||||||
@post.read_yaml(@source, @real_file)
|
@post.read_yaml(@source, @real_file)
|
||||||
|
|
||||||
assert_equal({"title" => "Test title", "layout" => "post", "tag" => "Ruby"}, @post.data)
|
assert_equal({"title" => "Test title", "layout" => "post", "tag" => "Ruby"}, @post.data)
|
||||||
assert_equal "\r\nThis is the content", @post.content
|
assert_equal "This is the content", @post.content
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context "with embedded triple dash" do
|
||||||
|
setup do
|
||||||
|
@real_file = "2010-01-08-triple-dash.markdown"
|
||||||
|
end
|
||||||
|
should "consume the embedded dashes" do
|
||||||
|
@post.read_yaml(@source, @real_file)
|
||||||
|
|
||||||
|
assert_equal({"title" => "Foo --- Bar"}, @post.data)
|
||||||
|
assert_equal "Triple the fun!", @post.content
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -164,7 +176,7 @@ class TestPost < Test::Unit::TestCase
|
||||||
@post.read_yaml(@source, @real_file)
|
@post.read_yaml(@source, @real_file)
|
||||||
|
|
||||||
assert_equal({"title" => "Foo Bar", "layout" => "default"}, @post.data)
|
assert_equal({"title" => "Foo Bar", "layout" => "default"}, @post.data)
|
||||||
assert_equal "\nh1. {{ page.title }}\n\nBest *post* ever", @post.content
|
assert_equal "h1. {{ page.title }}\n\nBest *post* ever", @post.content
|
||||||
end
|
end
|
||||||
|
|
||||||
should "transform textile" do
|
should "transform textile" do
|
||||||
|
|
|
@ -49,7 +49,7 @@ CONTENT
|
||||||
end
|
end
|
||||||
|
|
||||||
should "render markdown with pygments line handling" do
|
should "render markdown with pygments line handling" do
|
||||||
assert_match %{<pre>test\n</pre>}, @result
|
assert_match %{<pre><code class='text'>test\n</code></pre>}, @result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ CONTENT
|
||||||
end
|
end
|
||||||
|
|
||||||
should "render markdown with pygments line handling" do
|
should "render markdown with pygments line handling" do
|
||||||
assert_match %{<pre>Æ\n</pre>}, @result
|
assert_match %{<pre><code class='text'>Æ\n</code></pre>}, @result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue