getnikola / plugins

Extra plugins for Nikola
https://plugins.getnikola.com/
MIT License
59 stars 95 forks source link

[orgmode] If your post include images the title-post link always leads to a copy of your post where images are always nil #358

Closed touxstone closed 4 years ago

touxstone commented 4 years ago

I found out you get into trouble if your post embeds an image file as while you have had to place your image files into a file called images and the Nikola engine produces and ad-hoc output copy set of files which actually keeps the relative path references, the post-title link rather, leads to a created dir (named same than your post title) which contains an extra copy of your post and located at your-blog-dir/output/posts/ so an extra step nested in terms of scope of the path of your images when you wrote your post.

Kwpolska commented 4 years ago

Org-mode makes assumptions about images that are invalid in Nikola, the README or other issues should describe them. You should make it so org-mode uses absolute paths, like /images/foo.png — even if those might not be displayable from a non-Nikola context.

touxstone commented 3 years ago

I have already tried that option (citing an inline image by typing [[file:/images/foo.png]] (as we're still working in org-mode terms, are we?)) then $nikola build then $nikola serve => result? I got nil as alt, where the image should be shown, always (I mean, also on your rendered post and when going by clicking on your brand-title blog link (so forget to deploy it)). In the current scenary, rather (citing inline images by [[file:../images/foo.png]] ) you only have that issue when following your post-title-link.

Kwpolska commented 3 years ago

There are examples in the readme on how to accomplish this: https://github.com/getnikola/plugins/tree/master/v8/orgmode#image-urls