Uploaded image for project: 'Jenkins Website'
  1. Jenkins Website
  2. WEBSITE-438

Add an Asciidoctor extensions block called 'commandline' that provides an annotation-free section for copying content

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      The Asciidoctor extensions [pipeline] block allows for // Declarative // and // Scripted // sections to be rendered differently - i.e. anything in the // Scripted // section is hidden by default and gets revealed when the Toggle Scripted Pipeline link is clicked.

      Currently, we are starting to implement command line snippets with AsciiDoc annotations to describe options for commands like docker run ... (on the Installing Jenkins page and tutorial pages). Unfortunately, when readers copy these annotated commands from the documentation and paste them into their command line/window, the annotations get copied and introduce syntax errors resulting in the command not working. This is particularly apparent with commands broken over multiple lines (with each option presented and annotated on its own line).

      Therefore, could we implement something similar to the [pipeline] extension (with a name like [commandline] or [command]) that provides a Toggle Unannotated Version link, which does exactly the same thing - i.e. readers can click the link, access an unannotated version of the command, which they can copy and paste into their command line/window.

        Attachments

          Activity

          Hide
          ggaskell Giles Gaskell added a comment - - edited

          This request came about from a discussion with Liam Newman on PR 1218.

          Show
          ggaskell Giles Gaskell added a comment - - edited This request came about from a discussion with Liam Newman on PR 1218 .
          Hide
          zbynek Zbynek Konecny added a comment -

          Giles Gaskell Copying from https://jenkins.io/doc/book/installing/ works (no annotations copied), maybe this is no longer relevant?

          Show
          zbynek Zbynek Konecny added a comment - Giles Gaskell Copying from https://jenkins.io/doc/book/installing/ works (no annotations copied), maybe this is no longer relevant?
          Hide
          zbynek Zbynek Konecny added a comment -

          The callouts are documented to be safe to copy: https://github.com/asciidoctor/asciidoctor.org/blob/master/docs/_includes/callout-copy.adoc so it's not necessary to implement this workaround.

          Show
          zbynek Zbynek Konecny added a comment - The callouts are documented to be safe to copy:  https://github.com/asciidoctor/asciidoctor.org/blob/master/docs/_includes/callout-copy.adoc  so it's not necessary to implement this workaround.

            People

            Assignee:
            rtyler R. Tyler Croy
            Reporter:
            ggaskell Giles Gaskell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: