-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Compatibility with Jekyll: where to find images (and other files) ? #5
Comments
Just so I get this right: if you want a link in
or
? (or: do I need to add separate options for images and links or can it be the same one? ^^) |
By default, links are computed relatively to the Markdown file that uses them. Setting `base_path` allows to override this behaviour: in this case, links will be relative to this path. `base_path` sets the paths both for images and links, but it is possible to set them independently, respectively with base_path.images and base_path.links. Note that if base_path is set, these two options won't be looked at. Should fix issue #5.
I added the option to set it independently or as a a whole, so that should take care of it ^^ Probably won't work well for current HTML renderer, though (in case of image embedding, the whole self-contained page might start to show its limits anyway). |
Also, these options currently don't work when used with the |
To answer to your question #5 (comment), for links between post with Jekyll, it depends heavily on the way Jekyll is configured. Jekyll allows users to fine tune the URL they want to get from
or
or (if the
or
In any case, a Jekyll user will link directly to a file stored in Back to the original problem: considering images or links, the Cheers ! |
I should have read your commit comment in d0f006f before answering your question... I'll test it today, maybe this evening, but, I agree, this should solve this issue. |
(I don't get when mentions in commits automatically close issues or not... Well, I guess it should be closed now since the --set option should now work with book_path. Not entirely sure everything is fixed, though ^^) |
I was not aware of the ability to close issues directly with commit... seems a Github feature to me, and a not-so-good idea. |
It seems to work well for me. Many thanks. 👍 |
I just get this problem with images, but I suspect this will occur with all others files.
First, let me show you the directory structures of jekyll. Most of the MD files are stored in the directory
_posts
and that's main content of the website. Inside those files, relative URL are supposed to be relative to the top of the website. Images are usually stored elsewhere, as the_posts
directory will not be published as it is. So let's say that images are stored in theimg
directory. So, we have this structure:So, in
my-first-short-story.md
, I have a image linked in markdown this way:![Ugly...](img/ugly.png)
No problem for Jekyll. But Crowbook is not able to find the file when converting
my-first-short-story.md
.I suspect this to affect any relative URL.
A solution may be to add an option to set the root to start with when using relative url, something like the
base href
directive in HTML.The text was updated successfully, but these errors were encountered: