-
Notifications
You must be signed in to change notification settings - Fork 96
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
Linking to images from Scribble files #227
Comments
A thought: I suspect the purpose of rewriting the paths for these elements is for the ones that are generated by What do you think @greghendershott ? I'd be happy to give a crack at it if you're good with the idea. |
Yes, it's handling the sort of images people generate in Scribble. (As the comment in
That sounds plausible -- although maybe a lot of work. OR: Another option might be to follow the example of the Of the two, I'd lean toward the latter. It's a bit of a kludge -- but so is the entire |
p.s. I suppose |
I'm a-okay with adding a property kludge. I don't understand what you mean by the alt tag suggestion though... are you suggesting filling in a value in the alt tag that's Frog-related? I'd rather not do that because the alt tag has an important accessibility purpose that we wouldn't want to strip out (providing an alternate name for the visually impaired). |
I meant #lang scribble/manual
@(require frog/scribble
scribble/core
scribble/html-properties)
@(elem
#:style
(style #f
(list (alt-tag "img") ;; <========= HERE
(attributes '((src . "/img/IMG_20170918_155136272_HDR.jpg")
(beep . "boop")))))) Although I'm not familiar with So I was suggesting something like Then in |
It would be good to be able to link to images in the
img/
directory in Scribble files. Using@image
isn't great because Racket copies the image in question into memory and then writes it out again rather than just using what's already there.I tried doing this using something like:
I was surprised to find that the outputted html looked like so:
Why did src get modified? I tried running this with the plain
scribble
command line tool, no Frog involved, and it was fine.I think I found the source of the problem in
frog/private/read-scribble.rkt
:which is being called from
write-non-post-page
in non-posts.rkt. So it looks like all image src's are being rewritten by Frog, even in the case where this isn't desired.Happy to submit a patch to fix this... but I guess this was intentionally transforming the html for some reason, and I'm not sure on this layer how to only rewrite certain images but not others.
The text was updated successfully, but these errors were encountered: