X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=_posts%2F2014-01-01-example-content.md;h=a090b1ee78cd6a4e56ef287c3e79427c17533273;hb=312e77a7f3e46bc684e1772f7d705c607c7ae87f;hp=6c0f875ab66aa5a84b63df8cfb4f4c00f3403d5d;hpb=188b972fb514ee9a9c24d17ad497f1aff0fe16fb;p=blog diff --git a/_posts/2014-01-01-example-content.md b/_posts/2014-01-01-example-content.md index 6c0f875..a090b1e 100644 --- a/_posts/2014-01-01-example-content.md +++ b/_posts/2014-01-01-example-content.md @@ -49,7 +49,7 @@ Vivamus sagittis lacus vel augue rutrum faucibus dolor auctor. Duis mollis, est ### Code -Cum sociis natoque penatibus et magnis dis `code element` montes, nascetur ridiculus mus. +Inline code is available with the `` element. Snippets of multiple lines of code are supported through Pygments. Longer lines will automatically scroll horizontally when needed. {% highlight js %} // Example can be run directly in your JavaScript console @@ -62,6 +62,19 @@ adder(2, 6); // > 8 {% endhighlight %} +You may also optionally show code snippets with line numbers. Add `linenos` to the Pygments tags. + +{% highlight js linenos %} +// Example can be run directly in your JavaScript console + +// Create a function that takes two arguments and returns the sum of those arguments +var adder = new Function("a", "b", "return a + b"); + +// Call the function +adder(2, 6); +// > 8 +{% endhighlight %} + Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa. ### Gists via GitHub Pages