redesign highlightable code and allow line numbers
[blog] / _posts / 2014-01-01-example-content.md
index 6c0f875ab66aa5a84b63df8cfb4f4c00f3403d5d..a090b1ee78cd6a4e56ef287c3e79427c17533273 100644 (file)
@@ -49,7 +49,7 @@ Vivamus sagittis lacus vel augue rutrum faucibus dolor auctor. Duis mollis, est
 \r
 ### Code\r
 \r
-Cum sociis natoque penatibus et magnis dis `code element` montes, nascetur ridiculus mus.\r
+Inline code is available with the `<code>` element. Snippets of multiple lines of code are supported through Pygments. Longer lines will automatically scroll horizontally when needed.\r
 \r
 {% highlight js %}\r
 // Example can be run directly in your JavaScript console\r
@@ -62,6 +62,19 @@ adder(2, 6);
 // > 8\r
 {% endhighlight %}\r
 \r
+You may also optionally show code snippets with line numbers. Add `linenos` to the Pygments tags.\r
+\r
+{% highlight js linenos %}\r
+// Example can be run directly in your JavaScript console\r
+\r
+// Create a function that takes two arguments and returns the sum of those arguments\r
+var adder = new Function("a", "b", "return a + b");\r
+\r
+// Call the function\r
+adder(2, 6);\r
+// > 8\r
+{% endhighlight %}\r
+\r
 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.\r
 \r
 ### Gists via GitHub Pages\r