Skip to content

Use code blocks for inline commands #2631

@josill

Description

@josill

Summary

Convert inline command examples to code blocks so they have copy buttons, making it easier for users to copy commands.

Basic example

Current (quick-start.adoc):

So for doing so, please execute the following command:

1. To see what would change: `updatecli diff --config manifest.yaml`
2. To apply the change: `updatecli apply --config manifest.yaml`
3. To see that nothing needs to be changed anymore: `updatecli apply --config manifest.yaml`

Proposed:

So for doing so, please execute the following commands:

1. To see what would change:

[source,shell]
----
updatecli diff --config manifest.yaml
----

2. To apply the change:

[source,shell]
----
updatecli apply --config manifest.yaml
----

3. To see that nothing needs to be changed anymore:

[source,shell]
----
updatecli apply --config manifest.yaml
----

Motivation

Why are we doing this? The website already has copy button functionality that automatically adds copy buttons to code blocks (<pre> elements), but commands displayed as inline code (backticks) don't get copy buttons. Users must manually select text, which is error-prone.

What use cases does it support? Users following tutorials and guides need to copy commands accurately. Code blocks with copy buttons reduce errors and improve the experience, especially on mobile devices.

What is the expected outcome? All command examples are displayed in code blocks with copy buttons, providing a consistent and easier way to copy commands throughout the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions