Browse code

Removes 'titlecase' from page name, fixes #202

Frederic Hemberger authored on 16/10/2011 at 09:49:18
Showing 1 changed files
... ...
@@ -91,7 +91,6 @@ end
91 91
 desc "Begin a new post in #{source_dir}/#{posts_dir}"
92 92
 task :new_post, :title do |t, args|
93 93
   raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
94
-  require './plugins/titlecase.rb'
95 94
   mkdir_p "#{source_dir}/#{posts_dir}"
96 95
   args.with_defaults(:title => 'new-post')
97 96
   title = args.title
... ...
@@ -103,7 +102,7 @@ task :new_post, :title do |t, args|
103 103
   open(filename, 'w') do |post|
104 104
     post.puts "---"
105 105
     post.puts "layout: post"
106
-    post.puts "title: \"#{title.gsub(/&/,'&').titlecase}\""
106
+    post.puts "title: \"#{title.gsub(/&/,'&')}\""
107 107
     post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
108 108
     post.puts "comments: true"
109 109
     post.puts "categories: "
... ...
@@ -115,7 +114,6 @@ end
115 115
 desc "Create a new page in #{source_dir}/(filename)/index.#{new_page_ext}"
116 116
 task :new_page, :filename do |t, args|
117 117
   raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
118
-  require './plugins/titlecase.rb'
119 118
   args.with_defaults(:filename => 'new-page')
120 119
   page_dir = source_dir
121 120
   if args.filename =~ /(^.+\/)?([\w_-]+)(\.)?(.+)?/
... ...
@@ -132,7 +130,7 @@ task :new_page, :filename do |t, args|
132 132
     open(file, 'w') do |page|
133 133
       page.puts "---"
134 134
       page.puts "layout: page"
135
-      page.puts "title: \"#{$2.gsub(/[-_]/, ' ').titlecase}\""
135
+      page.puts "title: \"#{$2.gsub(/[-_]/, ' ')}\""
136 136
       page.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
137 137
       page.puts "comments: true"
138 138
       page.puts "sharing: true"