Skip to content

Commit d82396e

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 8dc291a + 0dde354 commit d82396e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Rakefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ module JB
4040
end #Path
4141
end #JB
4242

43-
# Usage: rake post title="A Title" [date="2012-02-09"]
43+
# Usage: rake post title="A Title" [date="2012-02-09"] [tags=[tag1, tag2]]
4444
desc "Begin a new post in #{CONFIG['posts']}"
4545
task :post do
4646
abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts'])
4747
title = ENV["title"] || "new-post"
48+
tags = ENV["tags"] || "[]"
4849
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
4950
begin
5051
date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d')
@@ -197,8 +198,8 @@ namespace :theme do
197198
# Mirror each file into the framework making sure to prompt if already exists.
198199
packaged_theme_files.each do |filename|
199200
file_install_path = File.join(JB::Path.base, filename)
200-
if File.exist? file_install_path
201-
next if ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
201+
if File.exist? file_install_path and ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
202+
next
202203
else
203204
mkdir_p File.dirname(file_install_path)
204205
cp_r File.join(packaged_theme_path, filename), file_install_path

_posts/core-samples/2011-12-29-jekyll-introduction.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ Jekyll expects your website directory to be laid out like so:
9090
| |-- default.html
9191
| |-- post.html
9292
|-- _posts
93-
| |-- 20011-10-25-open-source-is-good.markdown
94-
| |-- 20011-04-26-hello-world.markdown
93+
| |-- 2011-10-25-open-source-is-good.markdown
94+
| |-- 2011-04-26-hello-world.markdown
9595
|-- _site
9696
|-- index.html
9797
|-- assets

0 commit comments

Comments
 (0)