Skip to content

Commit

Permalink
merge lastest from mojombo/jekyll master
Browse files Browse the repository at this point in the history
  • Loading branch information
edeustace committed Jan 11, 2013
2 parents 6eed918 + 6253f79 commit 0fa5541
Show file tree
Hide file tree
Showing 71 changed files with 4,539 additions and 95 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -8,3 +8,5 @@ _site/
.bundle/
.DS_Store
bbin/
gh-pages/
site/_site/
1 change: 1 addition & 0 deletions .ruby-version
@@ -0,0 +1 @@
1.9.3-p362
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,45 @@
Contribute
==========

So you've got an awesome idea to throw into Jekyll. Great! Please keep the following in mind:

* **Contributions will not be accepted without tests.**
* If you're creating a small fix or patch to an existing feature, just a simple test will do. Please stay in the confines of the current test suite and use [Shoulda](http://github.com/thoughtbot/shoulda/tree/master) and [RR](http://github.com/btakita/rr/tree/master).
* If it's a brand new feature, make sure to create a new [Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps where appropriate. Also, whipping up some documentation in your fork's wiki would be appreciated, and once merged it will be transferred over to the main wiki.

Test Dependencies
-----------------

To run the test suite and build the gem you'll need to install Jekyll's dependencies. Jekyll uses Bundler, so a quick run of the bundle command and you're all set!

$ bundle

Before you start, run the tests and make sure that they pass (to confirm your environment is configured properly):

$ rake test
$ rake features

Workflow
--------

Here's the most direct way to get your work merged into the project:
* Fork the project
* Clone down your fork ( `git clone git://github.com/<username>/jekyll.git` )
* Create a topic branch to contain your change ( `git checkout -b my_awesome_feature` )
* Hack away, add tests. Not necessarily in that order.
* Make sure everything still passes by running `rake`
* If necessary, rebase your commits into logical chunks, without errors
* Push the branch up ( `git push origin my_awesome_feature` )
* Create an issue with a description and link to your branch

Gotchas
-------

* If you want to bump the gem version, please put that in a separate commit. This way, the maintainers can control when the gem gets released.
* Try to keep your patch(es) based from the latest commit on mojombo/jekyll. The easier it is to apply your work, the less work the maintainers have to do, which is always a good thing.
* Please don't tag your GitHub issue with [fix], [feature], etc. The maintainers actively read the issues and will label it once they come across it.

Finally...
----------

Thanks! Hacking on Jekyll should be fun, and if for some reason it's a pain to do let us know so we can fix it.
14 changes: 14 additions & 0 deletions History.txt
@@ -1,4 +1,14 @@
== HEAD
* Minor Enhancements
* Add source and destination directory protection (#535)
* Better YAML error message (#718)
* Bug Fixes
* Prevent custom destination from causing continuous regen (#528)
* Site Enhancements
* Bring site into master branch with better preview/deploy (#709)
* Redesigned site (#583)

== 0.12.0 / 2012-12-22
* Minor Enhancements
* Add ability to explicitly specify included files (#261)
* Add --default-mimetype option (#279)
Expand All @@ -7,12 +17,16 @@
* Allow multiple plugin dirs to be specified (#438)
* Inline TOC token support for RDiscount (#333)
* Add the option to specify the paginated url format (#342)
* Swap out albino for pygments.rb (#569)
* Support Redcarpet 2 and fenced code blocks (#619)
* Better reporting of Liquid errors (#624)
* Bug Fixes
* Allow some special characters in highlight names
* URL escape category names in URL generation (#360)
* Fix error with limit_posts (#442)
* Properly select dotfile during directory scan (#363, #431, #377)
* Allow setting of Kramdown smart_quotes (#482)
* Ensure front-matter is at start of file (#562)

== 0.11.2 / 2011-12-27
* Bug Fixes
Expand Down
13 changes: 7 additions & 6 deletions README.textile
Expand Up @@ -22,19 +22,20 @@ h2. Diving In

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)
* Kramdown: Markdown-superset converter (Ruby)
* Liquid: Templating system (Ruby)
* Maruku: Default markdown engine (Ruby)
* Pygments: Syntax highlighting (Python)

h2. Developer Dependencies

* Shoulda: Test framework (Ruby)
* RR: Mocking (Ruby)
* RedGreen: Nicer test output (Ruby)
* RDiscount: Discount Markdown Processor (Ruby)
* RedCloth: Textile support (Ruby)
* RedGreen: Nicer test output (Ruby)
* RR: Mocking (Ruby)
* Shoulda: Test framework (Ruby)

h2. License

Expand Down
66 changes: 66 additions & 0 deletions Rakefile
Expand Up @@ -109,6 +109,72 @@ rescue LoadError
end
end

#############################################################################
#
# Site tasks - http://jekyllrb.com
#
#############################################################################

namespace :site do
desc "Generate and view the site locally"
task :preview do
require "launchy"

# Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and
# then open it in a browser. Someday we can do better than this, I hope.
Thread.new do
sleep 4
puts "Opening in browser..."
Launchy.open("http://localhost:4000")
end

# Generate the site in server mode.
puts "Running Jekyll..."
Dir.chdir("site") do
sh "#{File.expand_path('bin/jekyll', File.dirname(__FILE__))} --server"
end
end

desc "Commit the local site to the gh-pages branch and publish to GitHub Pages"
task :publish do
# Failsafe. Remove this once it has been done.
puts "Make sure to merge #583 into gh-pages before deploying."
exit(1)

# Ensure the gh-pages dir exists so we can generate into it.
puts "Checking for gh-pages dir..."
unless File.exist?("./gh-pages")
puts "No gh-pages directory found. Run the following commands first:"
puts " `git clone git@github.com:mojombo/jekyll gh-pages"
puts " `cd gh-pages"
puts " `git checkout gh-pages`"
exit(1)
end

# Ensure gh-pages branch is up to date.
Dir.chdir('gh-pages') do
sh "git pull origin gh-pages"
end

# Copy to gh-pages dir.
puts "Copying site to gh-pages branch..."
Dir.glob("site/*") do |path|
next if path == "_site"
sh "cp -R #{path} gh-pages/"
end

# Commit and push.
puts "Committing and pushing to GitHub Pages..."
sha = `git log`.match(/[a-z0-9]{40}/)[0]
Dir.chdir('gh-pages') do
sh "git add ."
sh "git commit -m 'Updating to #{sha}.'"
sh "git push origin gh-pages"
end
puts 'Done.'
end
end

#############################################################################
#
# Packaging tasks
Expand Down
6 changes: 3 additions & 3 deletions bin/jekyll
Expand Up @@ -229,10 +229,10 @@ source = options['source']
destination = options['destination']

# Files to watch
def globs(source)
def globs(source, destination)
Dir.chdir(source) do
dirs = Dir['*'].select { |x| File.directory?(x) }
dirs -= ['_site']
dirs -= [destination]
dirs = dirs.map { |x| "#{x}/**/*" }
dirs += ['*']
end
Expand All @@ -249,7 +249,7 @@ if options['auto']

dw = DirectoryWatcher.new(source)
dw.interval = 1
dw.glob = globs(source)
dw.glob = globs(source, destination)

dw.add_observer do |*args|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
Expand Down
18 changes: 13 additions & 5 deletions jekyll.gemspec
Expand Up @@ -4,8 +4,9 @@ Gem::Specification.new do |s|
s.rubygems_version = '1.3.5'

s.name = 'jekyll'
s.version = '0.11.2'
s.date = '2011-12-27'
s.version = '0.12.0'
s.license = 'MIT'
s.date = '2012-12-22'
s.rubyforge_project = 'jekyll'

s.summary = "A simple, blog aware, static site generator."
Expand All @@ -27,7 +28,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('directory_watcher', "~> 1.1")
s.add_runtime_dependency('maruku', "~> 0.5")
s.add_runtime_dependency('kramdown', "~> 0.13.4")
s.add_runtime_dependency('pygments.rb', "~> 0.2.12")
s.add_runtime_dependency('pygments.rb', "~> 0.3.2")

s.add_development_dependency('rake', "~> 0.9")
s.add_development_dependency('rdoc', "~> 3.11")
Expand All @@ -37,7 +38,8 @@ Gem::Specification.new do |s|
s.add_development_dependency('cucumber', "1.1")
s.add_development_dependency('RedCloth', "~> 4.2")
s.add_development_dependency('rdiscount', "~> 1.6")
s.add_development_dependency('redcarpet', "~> 1.9")
s.add_development_dependency('redcarpet', "~> 2.1.1")
s.add_development_dependency('launchy', "~> 2.1.2")

# = MANIFEST =
s.files = %w[
Expand Down Expand Up @@ -74,10 +76,12 @@ Gem::Specification.new do |s|
lib/jekyll/migrators/csv.rb
lib/jekyll/migrators/drupal.rb
lib/jekyll/migrators/enki.rb
lib/jekyll/migrators/joomla.rb
lib/jekyll/migrators/marley.rb
lib/jekyll/migrators/mephisto.rb
lib/jekyll/migrators/mt.rb
lib/jekyll/migrators/posterous.rb
lib/jekyll/migrators/rss.rb
lib/jekyll/migrators/textpattern.rb
lib/jekyll/migrators/tumblr.rb
lib/jekyll/migrators/typo.rb
Expand All @@ -90,6 +94,9 @@ Gem::Specification.new do |s|
lib/jekyll/static_file.rb
lib/jekyll/tags/highlight.rb
lib/jekyll/tags/include.rb
lib/jekyll/tags/post_url.rb
test/fixtures/broken_front_matter1.erb
test/fixtures/front_matter.erb
test/helper.rb
test/source/.htaccess
test/source/_includes/sig.markdown
Expand Down Expand Up @@ -132,6 +139,7 @@ Gem::Specification.new do |s|
test/source/z_category/_posts/2008-9-23-categories.textile
test/suite.rb
test/test_configuration.rb
test/test_convertible.rb
test/test_core_ext.rb
test/test_filters.rb
test/test_generated_site.rb
Expand All @@ -141,9 +149,9 @@ Gem::Specification.new do |s|
test/test_post.rb
test/test_rdiscount.rb
test/test_redcarpet.rb
test/test_redcloth.rb
test/test_site.rb
test/test_tags.rb
test/test_redcloth.rb
]
# = MANIFEST =

Expand Down
46 changes: 25 additions & 21 deletions lib/jekyll.rb
Expand Up @@ -46,47 +46,50 @@ def require_all(path)
require_all 'jekyll/tags'

module Jekyll
VERSION = '0.11.2'
VERSION = '0.12.0'

# Default options. Overriden by values in _config.yml or command-line opts.
# (Strings rather symbols used for compatability with YAML).
# Strings rather than symbols are used for compatability with YAML.
DEFAULTS = {
'safe' => false,
'auto' => false,
'server' => false,
'server_port' => 4000,

'source' => Dir.pwd,
'destination' => File.join(Dir.pwd, '_site'),
'plugins' => File.join(Dir.pwd, '_plugins'),
'source' => Dir.pwd,
'destination' => File.join(Dir.pwd, '_site'),
'plugins' => File.join(Dir.pwd, '_plugins'),
'layouts' => '_layouts',
'keep_files' => ['.git','.svn'],
'layouts' => '_layouts',

'future' => true,
'lsi' => false,
'pygments' => false,
'markdown' => 'maruku',
'permalink' => 'date',
'include' => ['.htaccess'],

'future' => true,
'lsi' => false,
'pygments' => false,
'markdown' => 'maruku',
'permalink' => 'date',
'include' => ['.htaccess'],
'paginate_path' => 'page:num',

'markdown_ext' => 'markdown,mkd,mkdn,md',
'textile_ext' => 'textile',
'markdown_ext' => 'markdown,mkd,mkdn,md',
'textile_ext' => 'textile',

'maruku' => {
'maruku' => {
'use_tex' => false,
'use_divs' => false,
'png_engine' => 'blahtex',
'png_dir' => 'images/latex',
'png_url' => '/images/latex'
},
'rdiscount' => {

'rdiscount' => {
'extensions' => []
},
'redcarpet' => {

'redcarpet' => {
'extensions' => []
},
'kramdown' => {

'kramdown' => {
'auto_ids' => true,
'footnote_nr' => 1,
'entity_output' => 'as_char',
Expand All @@ -103,8 +106,9 @@ module Jekyll
'coderay_css' => 'style'
}
},
'redcloth' => {
'hard_breaks' => true

'redcloth' => {
'hard_breaks' => true
}
}

Expand Down

0 comments on commit 0fa5541

Please sign in to comment.