Code Block

Use the code block to add code to pages or posts in Kirby. There are a number of settings to customize the layout such as the alignment and width of the block.
Code Block
<?php if ($block->text()->isNotEmpty()): ?>
  <pre><code><?= $block->text()->html() ?></code></pre>
<?php endif ?>