Subject: bug#73425: 31.0.50; Support images in HTML versions of ELPA package manuals

From: Eshel Yaron <[email-masked]>
Date: Tue, 22 Apr 2025 12:24:24 +0200

Hi,

Stefan Monnier <[email-masked]> writes:

>> So currently the way we include images in kubed.texi is as follows:
>>
>> --8<---------------cut here---------------start------------->8---
>> @ifhtml
>> @float
>> @image{/assets/kubed-overview,,,Image: Four different kinds of Kubed buffers in Emacs,.png}
>> @caption{Pods, logs, shells, YAMLs, all in one integrated interface}
>> @end float
>> @end ifhtml
>> --8<---------------cut here---------------end--------------->8---
>>
>> This refers to https://eshelyaron.com/assets/kubed-overview.png
>
> Ah, so it's something "personal", nice, thanks.  I thought it could be
> some "standard convention" used on some system somewhere.
>
>> I'd love to change these references to relative paths so they also work
>> on the ELPA server,
>
> I guess our scripts could be told to strip away the "/assets/" part.
> I'll think about it.

Actually, Eli's suggestion to use @ifset and -Dfoo works pretty well :)
So I don't think any special handling is required, as I can just change
the image references to use relative paths and leverage @ifset to pick
another relative path for the node-per-page case.

After I'll make these changes in Kubed, we'll just need to update
elpa-packages with something like:

diff --git a/elpa-packages b/elpa-packages
index e4ae18a4be..711d8ff986 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -477,7 +477,8 @@
  ;;  :readme "README")
  (kmb			:url nil)
  (kubed			:url "https://git.sr.ht/~eshel/kubed"
-  :doc "kubed.texi")
+  :doc "kubed.texi"
+  :doc-files ("assets/"))
  (landmark		:url nil)
  (latex-table-wizard    :url "https://github.com/enricoflor/latex-table-wizard"
   :doc "latex-table-wizard.texi")

Thanks,

Eshel