Code can be presented inline, like <?php bloginfo('stylesheet_url'); ?>
, or within a ``` ```
block.
More information about code highlighting in jekyll can be found in Jekyll documentation.
These area a couple of examples showing the resulting highlighted code:
// css code sample
#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
// javascript code sample
$.ajax({
type: 'POST',
url: 'backend.php',
data: "q="+myform.serialize(),
success: function(data){
// on success use return data here
},
error: function(xhr, type, exception) {
// if ajax fails display error alert
alert("ajax error response type "+type);
}
});