Skip to content

Use standard syntax for output codeblocks.#328

Merged
johnnymatthews merged 2 commits into
mainfrom
refactor/code-output-blocks
Jul 20, 2026
Merged

Use standard syntax for output codeblocks.#328
johnnymatthews merged 2 commits into
mainfrom
refactor/code-output-blocks

Conversation

@johnnymatthews

@johnnymatthews johnnymatthews commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Writers can now use the following syntax when creating codeblocks that only contain output:

1. Install something:

```shell
sudo apt install something -y
```

```output
whatever_apt_outputs_when_installing_something
idk_i_cant_remember
```

This'll render the output block, but in black and white (no syntax highlighting) and no copy button. The idea here is to make it easier for readers to see what should and should not be copied into their terminal.

It looks like this:

image

Essentially a re-creation of #151, but this time for the Zola site (last one was Docusaurus).

We used to need to use a shortcode to show output blocks of code. This
changes that so we just need to use ```output, and that block will be
rendered in no-colours, and the copy button is gone.
If an `output` codeblock immediately follows a non-output codeblock
(like `shell` or `yaml` or whatever), then remove the margin between the
two. Otherwise, it'll stay as normal.
@johnnymatthews johnnymatthews changed the title Refactor/code output blocks Use standard syntax for output codeblocks. Jul 20, 2026
@johnnymatthews
johnnymatthews merged commit 503b261 into main Jul 20, 2026
2 checks passed
@johnnymatthews
johnnymatthews deleted the refactor/code-output-blocks branch July 20, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant