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

placement of images #172

Open
emacsomancer opened this Issue Jul 7, 2018 · 4 comments

Comments

2 participants
@emacsomancer
Copy link

emacsomancer commented Jul 7, 2018

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

This comment has been minimized.

Copy link
Owner

kaushalmodi commented Jul 7, 2018

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

  • Where are the images placed in the content-org?
    • Are you saving the images in page bundle structure?
  • What is the expect URL of the image in the final HTML?

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

This comment has been minimized.

Copy link
Author

emacsomancer commented Jul 8, 2018

  • in content-org, the images are in a subdirectory called images
    • Well, I have the following property set:
      :EXPORT_HUGO_BUNDLE: POST_NAME
  • apparently within the POST_NAME directory. I don't have a strong preference for how they're arranged. I just want a method where I don't have to worry about manually placing things, or having to recompile with different file-paths.
@kaushalmodi

This comment has been minimized.

Copy link
Owner

kaushalmodi commented Jul 8, 2018

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

This comment has been minimized.

Copy link
Author

emacsomancer commented Jul 8, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment