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

From: Stefan Monnier <[email-masked]>
Date: Thu, 26 Sep 2024 16:10:53 -0400

>> Yes.  My suggestion is to allow listing additional non-.texi/.org files
>> under :doc that would be copied out to the web server.  So in Eshel's
>> case, we could update the specification to be
>>
>>  (kubed			:url "https://git.sr.ht/~eshel/kubed"
>>   :doc ("kubed.texi" "images/"))
>>
>> and the HTTP server could host all files under images/.
>
> That has a significant drawback: when package maintainers want to add a
> new image, they have to patch the (Non-)GNU ELPA package listing.

Agreed.

> It would be better to keep that information it in the package itself
> somehow, like we do with .elpaignore.  Or we could just copy all image
> files automatically.

I think we should provide a "generic" way to provide some of the
`elpa-packages` contents directly from the package's own files.
I was thinking of something like a

    ;; ELPA-spec: (:readme "README.md" :doc "clear.texi" ...)

there's a security implication, so we'd need to "sanitize" this info
before using it, but other than that it should not be too hard
to implement.

But to get back to the "real" problem of images: in order for manual
`foo` to be able to have (working) cross-links to manual `bar`, it's
important that they are both exposed as `.../doc/foo.html` and
`.../doc/bar.html`, so they can't both use an image with a relative
URL of `snapshot1.png`.

        Stefan