kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
882 stars 132 forks source link

placement of images #172

Open emacsomancer opened 6 years ago

emacsomancer commented 6 years ago

I'm a bit confused about how to deal with images. So I have in my org-content directory a subdirectory images containing images I want to refer to in posts. So in the :PROPERTIES: of the relevant org header I have things like

:EXPORT_HUGO_IMAGES: images/pic01.jpg

But then in main body when I try to have these images displayed, I seem to need to initially have lines like:

file:images/pic01.jpg

to get them to export properly, but then I need to recompile changing these references to something like:

file:post/POST_NAME/pic01.jpg

in order for them actually to display in the post.

Is there a way to get this to behave more intuitively?

kaushalmodi commented 6 years ago

I need to ask a few questions to understand the issue correctly.

Also, the EXPORT_HUGO_IMAGES has nothing to do with the exports of image paths.. that property simply exports to an images front-matter.

emacsomancer commented 6 years ago
kaushalmodi commented 6 years ago

Hello,

There shouldn't be a need to manually placing things, and things should work with a single export (I do that in my blog).

See this test post/documentation and the tables in there: https://ox-hugo.scripter.co/test/bundles/page-bundle-a/.

I need to better document this (hopefully this coming week).

I am away from my computer, and will get some time tomorrow. Let me know if the above linked test case, and the associated Org source helps.

emacsomancer commented 6 years ago

Thanks @kaushalmodi . I'll have a look at the test post you linked.