public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@cherry.de>
To: Antonin Godard <antonin.godard@bootlin.com>, docs@lists.yoctoproject.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH] Add the sphinx-copybutton extension
Date: Thu, 18 Dec 2025 16:50:29 +0100	[thread overview]
Message-ID: <367af9f7-fac7-4120-ba9d-45f03ee73137@cherry.de> (raw)
In-Reply-To: <20251218-sphinx-copybutton-v1-1-752b7c4ff8f9@bootlin.com>

Hi Antonin,

On 12/18/25 10:44 AM, Antonin Godard wrote:
> This extension adds a copy button to code-blocks.
> 
> It was added to the buildtools tarballs for documentation with
> commit ebf14a6dc1a5 ("python3-sphinx-copybutton: add recipe") in
> OE-Core, so the the Autobuilder can use it.
> 
> Add it as a requirement in the docs, including in Ubuntu requirements.
> According to https://pkgs.org/download/python3-sphinx-copybutton this
> packages is provided under "python3-sphinx-copybutton" on all the
> versions of Ubuntu we support.
> 

Not enough sadly.

Go to 
yocto-docs/documentation/_build/html/ref-manual/terms.html#term-Build-Directory 
and click the copy button. It'll copy the $ as well, and it shouldn't. 
First, I believe those code blocks should be console and not shell (or 
shell but we remove $ in front). Note that some file have their 
highlight language changed to shell, c.f. the toaster files, so a simple 
grep will not return everything that needs to be changed.

Second, we may need to configure copybutton, e.g. 
https://sphinx-copybutton.readthedocs.io/en/latest/use.html#strip-and-configure-input-prompts-for-code-cells 
at the very least I guess.

FYI on Fedora, I believe we should be able to use packages from the 
package feed for all docs since f41 (but since we say we still support 
f39 and f40, not applicable right now).

Cheers,
Quentin


  reply	other threads:[~2025-12-18 15:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18  9:44 [PATCH] Add the sphinx-copybutton extension Antonin Godard
2025-12-18 15:50 ` Quentin Schulz [this message]
2025-12-19  9:21   ` [docs] " Antonin Godard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=367af9f7-fac7-4120-ba9d-45f03ee73137@cherry.de \
    --to=quentin.schulz@cherry.de \
    --cc=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox