Rakefile in jekyll-1.1.2 vs Rakefile in jekyll-1.2.0
- old
+ new
@@ -49,11 +49,11 @@
markdown.gsub(/\s{2}\*{1}/, "-")
end
def linkify_prs(markdown)
markdown.gsub(/#(\d+)/) do |word|
- "[#{word}](https://github.com/mojombo/jekyll/issues/#{word.delete("#")})"
+ "[#{word}]({{ site.repository }}/issues/#{word.delete("#")})"
end
end
def linkify_users(markdown)
markdown.gsub(/(@\w+)/) do |username|
@@ -145,10 +145,19 @@
Dir.chdir("site") do
sh "#{File.expand_path('bin/jekyll', File.dirname(__FILE__))} serve --watch"
end
end
+ desc "Update normalize.css library to the latest version and minify"
+ task :update_normalize_css do
+ Dir.chdir("site/css") do
+ sh 'curl "http://necolas.github.io/normalize.css/latest/normalize.css" -o "normalize.scss"'
+ sh 'sass "normalize.scss":"normalize.css" --style compressed'
+ sh 'rm "normalize.scss"'
+ end
+ end
+
desc "Commit the local site to the gh-pages branch and publish to GitHub Pages"
task :publish => [:history] do
# Ensure the gh-pages dir exists so we can generate into it.
puts "Checking for gh-pages dir..."
unless File.exist?("./gh-pages")
@@ -165,10 +174,10 @@
end
# Copy to gh-pages dir.
puts "Copying site to gh-pages branch..."
Dir.glob("site/*") do |path|
- next if path == "_site"
+ next if path.include? "_site"
sh "cp -R #{path} gh-pages/"
end
# Commit and push.
puts "Committing and pushing to GitHub Pages..."