cupper-hugo-theme/exampleSite/content/patterns/coding/command-line.md

24 lines
606 B
Markdown
Raw Normal View History

2017-07-15 10:28:17 +02:00
+++
title = "Command line"
+++
2017-11-02 16:37:06 +01:00
Your pattern documentation may need to include commands for installing packages or using <abbr title="command line interface">CLI</abbr>s. **Cupper** offers the `cmd` shortcode for making code blocks look like terminal commands.
2017-07-15 10:28:17 +02:00
Here's how you write it:
{{<codeBlock>}}
&#x7b;{&lt;cmd>}}
npm run start
&#x7b;{&lt;/cmd>}}
{{</codeBlock>}}
And here's how it looks:
{{<cmd>}}
npm run start
{{</cmd>}}
{{% warning %}}
The `cmd` shortcode currently only supports single commands. If you want to show multiple, successive commands use separate `cmd` blocks.
{{% /warning %}}