You can use fenced code blocks with the language specified after the first set of backtick fences.
Page Contents

Code Samples

Use fenced code blocks with the language specified, like this:

```js
console.log('hello');
````

Result:

console.log('hello');

For the list of supported languages you can use (similar to js for JavaScript), see Supported languages.

Code caption

Sometimes you want a caption on a code sample, for example to show the file name that contains the code. For example:

{% include code-caption.html content="/common/models/user.json" %} ```javascript "acls": [{   "principalType": "ROLE",   "principalId": "$authenticated",   "permission": "ALLOW",   "property": "count" }, { ... ```
Tags: