Skip to content

docs: add copy-to-clipboard to Report Builder LLM prompt and API blocks#15216

Merged
Maffooch merged 1 commit into
DefectDojo:bugfixfrom
skywalke34:docs/report-builder-copy-buttons
Jul 10, 2026
Merged

docs: add copy-to-clipboard to Report Builder LLM prompt and API blocks#15216
Maffooch merged 1 commit into
DefectDojo:bugfixfrom
skywalke34:docs/report-builder-copy-buttons

Conversation

@skywalke34

Copy link
Copy Markdown
Contributor

Description

The Report Builder LLM guide (added in #15008) presents a large, self-contained prompt that users are meant to copy in one shot and paste into Claude/ChatGPT — but that block had no copy-to-clipboard button, unlike the equivalent block in the Dashboards LLM guide (#15111).

Root cause: the docs theme (Doks / @thulite/doks-core) adds its copy button via clipboard.js, which targets every element with class highlight. Hugo only wraps a fenced code block in <div class="highlight"> when the fence declares a language. Two Report Builder blocks used a bare ``` fence, so they rendered as plain <pre> with no copy button.

Change

Tag the two bare fences as ```text (matching the working Dashboards LLM guide):

  • PRO__report_builder_llm.md — the self-contained LLM prompt
  • PRO__report_builder_api.md — the API base-URL example

Every other fence in the Report Builder docs already declared bash/json/python/shell, so they already had copy buttons. After this change, all API and LLM code/prompt blocks in the Report Builder docs are copy-to-clipboard capable.

Verification

Built the site locally with Hugo (hugo --gc) and confirmed:

  • report-builder-llm/ went from 1 → 2 .highlight blocks; the prompt now renders as <code class="language-text"> inside <div class="highlight">.
  • report-builder-api/ shows all fences wrapped in .highlight.

Docs-only change; no code paths affected.

Generated with Claude Code under the direction of T. Walker (skywalke34) - DefectDojo

…ase-URL blocks

The Doks docs theme (clipboard.js) only adds a copy button to fenced code
blocks that Hugo wraps in <div class="highlight">, which requires the fence
to declare a language. Two Report Builder blocks used a bare ``` fence and
therefore rendered as plain <pre> with no copy button:

- PRO__report_builder_llm.md: the self-contained LLM prompt users are meant
  to copy wholesale into Claude/ChatGPT
- PRO__report_builder_api.md: the API base-URL example

Tagging both fences as ```text matches the working Dashboards LLM guide and
gives every command/prompt in the Report Builder docs a copy button.

Authored by T. Walker - DefectDojo
@Maffooch Maffooch force-pushed the docs/report-builder-copy-buttons branch from 9ea3d02 to fb295b8 Compare July 10, 2026 18:26
@Maffooch Maffooch changed the base branch from dev to bugfix July 10, 2026 18:26
@Maffooch Maffooch requested a review from paulOsinski July 10, 2026 18:41
@paulOsinski

Copy link
Copy Markdown
Contributor

Didn't even know you could do that. Nice work!

@Maffooch Maffooch merged commit 8cd4fdb into DefectDojo:bugfix Jul 10, 2026
289 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants