Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merged 'mojombo/master' at 'v0.5.6'

  • Loading branch information...
commit 2a7b1cbd98cd0a05f3f406f45d3172cb96190e6e 2 parents 7806a0d + c92eb56
@krisb krisb authored
View
23 History.txt
@@ -1,10 +1,25 @@
-== edge
+== Edge
* Enhancements
* added support for extensions [issue #100]
+
+== 0.5.6 / 2010-01-08
* Bug Fixes
- * changed tests to require redcloth >= 4.2.1 [issue #92]
- * fixed pagination when number of pages is an exact multiple of max per page [issue #78]
- * fixed rendering order of site artifacts [issue #71]
+ * Require redcloth >= 4.2.1 in tests (#92)
+ * Don't break on triple dashes in yaml frontmatter (#93)
+ * 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
* Bug Fixes
View
23 README.textile
@@ -20,14 +20,21 @@ h2. Diving In
* 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
-h2. Dependencies
-
-* RedCloth: Textile support
-* Liquid: Templating system
-* Classifier: Generating related posts
-* Maruku: Default markdown engine
-* Directory Watcher: Auto-regeneration of sites
-* Open4: Talking to pygments for syntax highlighting
+h2. Runtime Dependencies
+
+* RedCloth: Textile support (Ruby)
+* Liquid: Templating system (Ruby)
+* Classifier: Generating related posts (Ruby)
+* Maruku: Default markdown engine (Ruby)
+* Directory Watcher: Auto-regeneration of sites (Ruby)
+* 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
View
5 VERSION.yml
@@ -1,4 +1,5 @@
---
-:patch: 4
-:major: 0
:minor: 5
+:patch: 6
+:build:
+:major: 0
View
6 bin/jekyll
@@ -145,9 +145,13 @@ if options['server']
FileUtils.mkdir_p(destination)
+ mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
+ mime_types.store 'js', 'application/javascript'
+
s = HTTPServer.new(
:Port => options['server_port'],
- :DocumentRoot => destination
+ :DocumentRoot => destination,
+ :MimeTypes => mime_types
)
t = Thread.new {
s.start
View
12 krisb-jekyll.gemspec → jekyll.gemspec
@@ -1,15 +1,15 @@
# Generated by jeweler
# 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 -*-
Gem::Specification.new do |s|
- s.name = %q{krisb-jekyll}
- s.version = "0.5.4"
+ s.name = %q{jekyll}
+ s.version = "0.5.6"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Tom Preston-Werner", "Kris Brown"]
- s.date = %q{2010-01-05}
+ s.authors = ["Tom Preston-Werner"]
+ s.date = %q{2010-01-08}
s.default_executable = %q{jekyll}
s.description = %q{Jekyll is a simple, blog aware, static site generator.}
s.email = %q{kris@kris.me.uk}
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
"lib/jekyll/pager.rb",
"lib/jekyll/post.rb",
"lib/jekyll/site.rb",
+ "lib/jekyll/static_file.rb",
"lib/jekyll/tags/highlight.rb",
"lib/jekyll/tags/include.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-06-22-empty-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/category/_posts/2008-9-23-categories.textile",
"test/source/contacts.html",
View
6 lib/jekyll.rb
@@ -69,10 +69,10 @@ def self.configuration(override)
begin
config = YAML.load_file(config_file)
raise "Invalid configuration - #{config_file}" if !config.is_a?(Hash)
- STDOUT.puts "Configuration from #{config_file}"
+ $stdout.puts "Configuration from #{config_file}"
rescue => err
- STDERR.puts "WARNING: Could not read configuration. Using defaults (and options)."
- STDERR.puts "\t" + err.to_s
+ $stderr.puts "WARNING: Could not read configuration. Using defaults (and options)."
+ $stderr.puts "\t" + err.to_s
config = {}
end
View
4 lib/jekyll/convertible.rb
@@ -22,7 +22,7 @@ def to_s
def read_yaml(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.data = YAML.load($1)
@@ -53,7 +53,7 @@ def content_type
case self.ext[1..-1]
when /textile/i
return 'textile'
- when /markdown/i, /mkdn/i, /md/i
+ when /markdown/i, /mkdn/i, /md/i, /mkd/i
return 'markdown'
end
return 'unknown'
View
14 lib/jekyll/tags/highlight.rb
@@ -30,12 +30,11 @@ def render(context)
end
def render_pygments(context, code)
+ output = add_code_tags(Albino.new(code, @lang).to_s(@options), @lang)
if context["content_type"] == "markdown"
- return "\n" + Albino.new(code, @lang).to_s(@options) + "\n"
+ return "\n" + output + "\n"
elsif context["content_type"] == "textile"
- return "<notextile>" + Albino.new(code, @lang).to_s(@options) + "</notextile>"
- else
- return Albino.new(code, @lang).to_s(@options)
+ return "<notextile>" + output + "</notextile>"
end
end
@@ -49,6 +48,13 @@ def render_codehighlighter(context, code)
</div>
HTML
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
View
5 test/source/_posts/2010-01-08-triple-dash.markdown
@@ -0,0 +1,5 @@
+---
+title: Foo --- Bar
+---
+
+Triple the fun!
View
10 test/test_configuration.rb
@@ -8,21 +8,21 @@ class TestConfiguration < Test::Unit::TestCase
should "fire warning with no _config.yml" do
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("\tNo such file or directory - #{@path}")
+ mock($stderr).puts("WARNING: Could not read configuration. Using defaults (and options).")
+ mock($stderr).puts("\tNo such file or directory - #{@path}")
assert_equal Jekyll::DEFAULTS, Jekyll.configuration({})
end
should "load configuration as hash" do
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({})
end
should "fire warning with bad config" do
mock(YAML).load_file(@path) { Array.new }
- mock(STDERR).puts("WARNING: Could not read configuration. Using defaults (and options).")
- mock(STDERR).puts("\tInvalid configuration - #{@path}")
+ mock($stderr).puts("WARNING: Could not read configuration. Using defaults (and options).")
+ mock($stderr).puts("\tInvalid configuration - #{@path}")
assert_equal Jekyll::DEFAULTS, Jekyll.configuration({})
end
end
View
2  test/test_generated_site.rb
@@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase
end
should "ensure post count is as expected" do
- assert_equal 17, @site.posts.size
+ assert_equal 18, @site.posts.size
end
should "insert site.posts into the index" do
View
16 test/test_post.rb
@@ -78,7 +78,19 @@ def do_render(post)
@post.read_yaml(@source, @real_file)
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
@@ -164,7 +176,7 @@ def do_render(post)
@post.read_yaml(@source, @real_file)
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
should "transform textile" do
View
4 test/test_tags.rb
@@ -49,7 +49,7 @@ def fill_post(code, override = {})
end
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
@@ -59,7 +59,7 @@ def fill_post(code, override = {})
end
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
Please sign in to comment.
Something went wrong with that request. Please try again.