About

Multi-syntax code

You can add code to your GitBook pages using code blocks.

When you add a code block, you can choose to set the syntaxarrow-up-right, show line numbersarrow-up-right, show a captionarrow-up-right, and wrap the linesarrow-up-right. It’s also easy to copy the contents of a code block to the clipboardarrow-up-right, so you can use it elsewhere.

Example of code block

const message = "hello world";
console.log(message);
circle-info

You can make code blocks span the full width of your windowarrow-up-right by clicking on the Options menu grip-dots-vertical icon in GitBook next to the block and choosing Full width.

Last updated