~sircmpwn/sr.ht-discuss

2

image in README.md

Details
Message ID
<DAE7466E-8D97-4102-8AFB-9B08CE4F511E@gmail.com>
DKIM signature
pass
Download raw message
Good afternoon, I tried to have an image in a README.md using markdown syntax and 
base64 encoded embedded image

![alt](png-link)
![alt](data:image/png;base64,base64.StdEncoding.EncodeToString(imgBytes))

Note `base64` is a go package. Both attempts were not successful. Both images have < 30KB.
I wonder now if that is intentional? I resorted to sourcehut sides but the traffic I 
generated with that was for sure bigger.  Hence I don't really understand. Any clarification 
on that matter would be appreciated.

All the best Stephan
Details
Message ID
<89d8c028-8385-4f5f-afff-781ad542f0f5@biro-tisak.hr>
In-Reply-To
<DAE7466E-8D97-4102-8AFB-9B08CE4F511E@gmail.com> (view parent)
DKIM signature
pass
Download raw message
On 5/26/24 12:17 AM, Stephan Lukits wrote:
> Note `base64` is a go package.To my knowledge, Sourcehut has not support for parsing scripts within 
README: just bog-standard markdown expressions.

Easiest solution would be to embed the base64 code into the file 
directly, or, if you really want it dynamically pulled from a file, you 
could write a script that writes it directly into a file, and have it 
run from builds.sr.ht

the manual page on the git service[1] also says that you can define a 
custom README file within which you can use HTML, and though I am not 
sure if it can pull an image elsewhere from the repo, I see no reason 
why it shouldn't.

Try providing an absolute site URL, if project relative filepath doesn't 
work.
Details
Message ID
<3a117d12-a92b-4efd-9ba7-5828cdb3e597@biro-tisak.hr>
In-Reply-To
<89d8c028-8385-4f5f-afff-781ad542f0f5@biro-tisak.hr> (view parent)
DKIM signature
pass
Download raw message
On 5/26/24 12:37 AM, Filip Jamuljak wrote:
*To my knowledge, Sourcehut has no support for parsing scripts within 
README: just bog-standard markdown expressions.
Reply to thread Export thread (mbox)