-
Notifications
You must be signed in to change notification settings - Fork 89
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
Relative image URLs are broken #42
Comments
Initial findingsUsing Fix Attempt
Fix NotesI had to use
The Next StepsZola promises the same asset-finding logic between markdown-post and directory-post styles. Maybe the shortcode needs some conditional logic for post-directory and post-markdown styles? |
Actually, this fix only breaks post-markdown style images if a mix of the two styles are used. As long as I stick to post-markdown or post-directory for the content of a post, everything's fine. It's almost as if Zola takes the first image shortcode as its cue for where it should look for images in the rest of the blog post. It's not pretty but is that a satisfactory fix for now, @pawroman? |
Created a draft PR with the fix. |
Thanks @goingforbrooke -- much appreciated! |
As reported by @ipetkov
Came across this while updating my site, turns out this change actually breaks relative image URLs 😬
Basically I am using
{{ image(src="blah.jpg") }}
since sometimes I organize posts in their own directory (whereindex.md
and the photo are siblings under the same directory). Browsers will interpret the URL as being relative to the current URL, except now the URL is rewritten tohttp://127.0.0.1:1111/flower.png
even though the actual image is located athttp://127.0.0.1:1111/the_post/flower.png
Originally posted by @ipetkov in #37 (comment)
The text was updated successfully, but these errors were encountered: