-
Notifications
You must be signed in to change notification settings - Fork 60
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
fix missing images in export #128
Conversation
Fix looks sensible to me. @OliverBalfour could you look this over? It doesnt look like a very high risk change at all. Image rendering images in the Obsidian Pandoc flow are affecting many people, this looks like it might solve a bunch of them. People reporting (likley related) image exporting Issues: https://forum.obsidian.md/t/how-to-pass-image-directory-location-to-pandoc/33349 |
@OliverBalfour I can see you've worked on this a bit as discussed in your Future Directions post. I reviwed your patch code, and this change is separate from what you've already done. @dirkroorda dirkroorda thanks for this patch, could you clean up and remove all the comments except for the code change lines, that'll make it easier for someone to just hit MERGE. I think here is the best place for disclaimers and workflow discussions, as you've done. Would be good to get this in if it's such a small simple fix and as you said it's working for you. |
@evolve2k Hi Richie, just did it. |
Looking forward to this update |
Is there something missing here or could we merge this? This would improve my workflow a lot! Thanks for your work! 🙂 |
@OliverBalfour? Can you help us all out. Hoping it's a very easy merge now. It's a 2 line change. |
It seems this patch only works for markdown mode, not html mode, referring to the below lines: Lines 106 to 146 in 68ff9e3
|
So, the problem is pulling the path information from the file object when passing the .md file. It looks like the current code passes the raw HTML from stdin, which lacks path data. So a potential fix would be to generate a temporary HTML file in the directory of the input file, then remove it once the export is complete. It's kind of awkward but it solves the problem from the pandoc command line point of view? |
Will this patch allow for images in PDF and odt too? |
See the comments in the code.
Test it before applying it, since I did not do any building-bundling whatsoever.