Added very basic code snippet example to sample post

This commit is contained in:
Parker Moore 2013-01-27 23:30:32 +01:00
parent bf78fe9b75
commit 704307d7fe
1 changed files with 10 additions and 0 deletions

View File

@ -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}")