Subject: Re: bug#58196: Trivial update to ediprolog

From: Stefan Monnier <[email-masked]>
Date: Fri, 28 Oct 2022 17:54:45 -0400

Stefan Kangas [2022-10-28 13:51:32] wrote:
> Stefan Monnier <[email-masked]> writes:
>>> For example, we could put factorial.png in
>>> /images/<package-name>/factorial.png.  The only cost is a bit of
>>
>> But the page which links to it is not inside `/images/<package-name>/`
>> so the relative link will still fail.
>
> I was thinking of using absolute but domain-specific links, i.e. moving
> all images to the directory:
>
>     $WEBROOT/images/<package>
>
> And then changing the img-tags to read:
>
>     <img src="/images/<package>/<image>">
>
> That way, we don't need to worry about relative links.  So, for example,
> if we have an image named "screenshot.png" in the repository for
> <package>, and it looks something like this in the raw HTML export:
>
>     <img src="https://cdn.github.com/foo/bar/screenshot.png">
>
> We replace everything before the last "/" with "/images/<package>", or
> indeed just add it there if the link is relative, so we end up with:
>
>     <img src="/images/<package>/screenshot.png">
>
> Does that make sense?
>
>> I think we need to first move the packages's webpages from
>>
>>    https://elpa.gnu.org/packages/<PKG>.html
>>
>> to
>>
>>    https://elpa.gnu.org/packages/<PKG>/index.html
>>
>> and then we can more easily copy image files and anything else to
>> that subdirectory.
>
> That's another option, yes.  That would allow us to use relative links.

It would also make for slightly shorter "home URL".

> Do we anticipate more things going in that directory, too?

All the old compressed tarballs would move there too, yes.  And also the
output for `:doc` (which currently lives in a `.../doc/<package>/`
subdir instead).

        Stefan