FerryDocs
ContributingDocs site

Code blocks

Each code block has a language. Options add a title, line numbers or a mark on a line.

Edit on GitHub

What you write:

Example
```bash title="Terminal"
ferry scale api 3 # [!code highlight]
```

What the reader sees:

Terminal
ferry scale api 3

Options

Always set a language. Write the options after the language.

OptionEffect
title="Terminal"A title above the block
lineNumbersA number before each line
noCopyNo copy button. Use it for output.

Marks on a line

Write the mark in a comment at the end of the line. Use the comment form of the language of the block.

MarkEffect
[!code highlight]The line has a color behind it.
[!code ++] / [!code --]The line shows as added or as removed.
[!code focus]The other lines step back.

On this page