diff --git a/lib/jekyll/commands/new.rb b/lib/jekyll/commands/new.rb index def9a380..51b3dbb1 100644 --- a/lib/jekyll/commands/new.rb +++ b/lib/jekyll/commands/new.rb @@ -20,6 +20,16 @@ module Jekyll { "layout" => "post", "title" => "Welcome to Jekyll!", "date" => Time.now.strftime('%Y-%m-%d %H:%M:%S'), "categories" => %w(jekyll update) }.to_yaml + "---", "You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes!", "To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext.", + "Jekyll also offers powerful support for code snippets:", + [ + "{% highlight ruby %}", + "def print_hi(name)", + ' puts "Hi, #{name}"', + "end", + "print_hi('Tom')" + "#=> prints 'Hi, Tom' to STDOUT." + "{% endhighlight %}" + ].join("#{$/}"), "Check out the [Jeyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh].", "[jekyll-gh]: https://github.com/mojombo/github\n[jekyll]: http://jekyllrb.com" ].join("#{$/*2}")