-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssite --host
doesn't fix <img>
urls (or they shouldn't need fixing)
#70
Comments
(This is a small corner of a larger possible problem with images that have EXIF width/height metadata, but I'm not sure yet - I ran into that doing updates to a published site, and when testing with |
Thank you for the great report! I tried to do my best when I implemented Could you sketch what should be the expected behaviour wrt image handling, and then I'll try to use it as a blueprint to redo it right? |
I think the overall idea of having smaller sizes in
|
Also, I have a more real-world case: I have a photo-heavy blog (where I'm already forcing |
(related thing I just noticed that might deserve a separate issue: |
(Tests with
2.4-1
as packaged on Ubuntu 24.04/noble.)I start with an
index.md
withsite_url: https://ssite-bug-t1.thok.org
andtemplate: blog.html
(and the other basic bits from the howto for a simple blog.) Then I runssite show --debug --host bug1.localhost
to get a name to bind to (that happens to be a localhost name, at least as far as the browser is concerned.)If I write a
post1.md
and then runconvert -background lightblue -fill blue -font AvantGarde-Book -pointsize 72 label:post1 post1.jpg
to generate a magic-image-for-post, I get<img alt='' srcset='/post1-thumbnail.jpg 128w, /post1.jpg 189w' src='/post1.jpg'></img>
which are all relative, so that's fine (though neither a#
nor a metadata title appear in thealt=
, that's probably another ticket.If I create a similar
post2.md
but withlightred.jpg
as the image file, and then
to explicitly include it (as I would when I want them in specific parts of the text, or simply to have more than one), I instead get<img alt="" src="https://ssite-bug-t1.thok.org/lightred.jpg" srcset="https://ssite-bug-t1.thok.org/lightred-thumbnail.jpg 128w, /lightred.jpg 471w">
Note that this does happen to render because the screen I'm using is wider than 471 (and the image-magick-generated image is 471x94) but thesrc
and the rest of thesrcset
don't work - in fact, if I resize the browser (using inspect) down to 114 pixels wide, the image vanishes and the console showsGET https://ssite-bug-t1.thok.org/lightred-thumbnail.jpg net::ERR_NAME_NOT_RESOLVED
.)It is possible from the wording in the man page that
--host
isn't supposed to do rewriting at all, and is just about letting you share on a local network or something - in that case, it's not about fixing them, it's about "inline images shouldn't getsite_url
added to them" instead.(For background: I'm pretty sure that what I really want is for the inline images to be
class=img-fluid
like they are for magic-name images, except in the above example I can't reproduce that in the index or post pages, even though the<figure ... ml-3
is getting generated.)(Also, no additional template or
.staticsite.py
orsettings.py
, these are just defaults - butshow
doesn't obey those anyway since it's aCommand
not aSiteCommand
.)The text was updated successfully, but these errors were encountered: