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
Images not being copied to output directory #339
Comments
Thanks for that info. I'll find some time this week to reproduce the issue and hopefully have a fix. |
Sorry, a month has flown by and I still haven't found time to look into this. I have been looking only at quick bug fixes in the past month. This is next on my list. |
I haven't yet documented the behavior of image copying for page bundles :P I have the auto-copying of images for page bundles implemented for a while. Here's its test case: https://ox-hugo.scripter.co/test/images-in-content/page-bundle-images-in-same-dir/ Here's the relevant Org source from this test file:
I'm working on adding this to the documentation now .. |
@zzamboni I have now documented this feature here: https://ox-hugo.scripter.co/doc/images-in-content/#images-and-page-bundles . Let me know if that documentation helps you with your goal in this issue. I can then close this issue if so. |
Hi @kaushalmodi - thanks for your work on this and the documentation, it really clarifies things. However, I'm afraid the problem I am having is triggered somehow by the fact that the image is included from an included file (since I am seeing the same issue even without bundles). I have fixed the links in the original issue description to point to the correct lines in specific commits (my previous links had "moved" as I updated the files), and to summarize: In my blog's zzamboni.org file, I have a post like this, which includes my Emacs config file:
The included
When exported by ox-hugo, the post contains lines like these:
As you can see, it's including the image from its original path in my filesystem, instead of copying it into the bundle (or even into the Thanks again for your help! |
Hmm, this (images in included Org files) certainly is an untested case! I will first need to add a test case for this and then I can debug and may be fix it. |
Thanks! Let me know if I can help with the investigation in any way. |
@zzamboni Sorry for leaving this hanging for so long. I tested out exporting images from included Org file and it works well.. I am wondering if the issue you are seeing is similar to #500 (comment)
|
I'll close this issue for now as I cannot reproduce the problem. Feel free to comment further here. |
@kaushalmodi Thanks - unfortunately I've not had a chance to check whether I still see this problem, but as soon as I do I will post an update. |
Actual Behavior
An image included in a post is linked in the output to its original location, instead of being copied to the output bundle's directory.
Expected Behavior
As per https://ox-hugo.scripter.co/doc/image-links/, I expected the image to be copied to the output bundle directory.
Example Org File
The relevant file is included into my main ox-hugo file via an
#+include
directive: https://gitlab.com/zzamboni/zzamboni.org/-/blob/6f5ce4cdd59bc45a8bd103e63b64cfbea12e6b79/content-org/zzamboni.org#L343The included file is here, pointing to the original image links: https://gitlab.com/zzamboni/dot-emacs/-/blob/a12c496751993d16ddadc97060ba35a96d1d5719/init.org#L1564-1572
Generated Markdown File or Error
The rendered output tries to link to the images in their original places instead of copying them under the bundle output directory, as seen here: https://gitlab.com/zzamboni/zzamboni.org/-/blob/6f5ce4cdd59bc45a8bd103e63b64cfbea12e6b79/content/post/my-emacs-configuration-with-commentary/index.md#L1535-1539
Ox-Hugo Debug Information
Debug Info
Debug information for
ox-hugo
Emacs Version
Org Version
Hugo Version
Org
load-path
shadowsWarning: Possible mixed installation of Org
Study the output of
M-x list-load-path-shadows
.ox-hugo
defcustomsThe text was updated successfully, but these errors were encountered: