Code Rendering

  • stylesheet
code.less  

Enables both the layout of code wells, and also the syntax highlighting of the specific code language. Syntax coloring provided by prettify.js with the Tomorrow Theme.

Code "wells" are styled based on the use of the <pre> and <code> tags around your desired code example.

Below are a few examples in various languages. This is not an exhaustive list of supported languages.

HTML

<pre>
   <code>
     <div class="example"><!--with a comment -->
       <h1>Example</h1>
       <p>This is some example code that is being styled.</p>
     </div>
   </code>
 </pre>

JavaScript

var foo = require('f'),
    bar = require('br'),
    writeFile = f.denodify(br.writeFile),
    path = require('path');
    
module.exports = function(littlePromise, options){
   return littlePromise.then(function(little){
     return writeFile(
         path.join(options.dest,'little.json'), 
         JSON.stringify(little) );
   });
};

JSON

{
  "sites": {
    "docs": {
      "key" : "value"
    }
  }
}