getnikola / plugins

Extra plugins for Nikola

Home Page:https://plugins.getnikola.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

touxstone opened this issue · comments

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.

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.

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.

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