Reputation: 2316
I'm building a simple Jekyll site. I've got a collection of markdown files I've already written. When I write I use MacDown because I get to see the images in the preview as I edit (which is great).
Now that I'm porting them to Jekyll (adding frontmatter and whatnot), I've run into a more that slightly annoying problem with vanilla Jekyll. All of my pages have their assets stored with them. That way, in the markdown I can just link an image like so:

I opted to keep this organization within Jekyll because the folders and their contents are copied over to _site
on build as is (I'm not using the _posts
directory for these pages). However, the markdown renderer seems to dislike these kinds of links. According to everything I've read, Jekyll doesn't bother translating the markdown for links like this.
My question is: what combination of Jekyll and Kramdown plugins/tricks/hacks do I have to use to make these links work?
I'd really love to be able to edit in MacDown (or any side-by-side) editor and see my changes before publishing without just hoping the ugly liquid {{ garbage }} will render correctly when I'm done writing. I'd also love for my site not to grow a cancerous and unnecessary img/
folder as I add more content.
EDIT:
Although my question is now answered, I was not actually asking a "what plugin do I need to download" question. My initial guess was that I'd have to extend the markdown parser myself with my own plugin, which is a programming question.
Upvotes: 1
Views: 170
Reputation: 969
There is a plugin that will allow you to do exactly what you're asking (
). Although because it is a plugin you can't use it on GitHub pages.
It is called jekyll-postfiles plugin by Nicolas Hoizey. He wrote an article explaining how it works that might also be helpful.
Upvotes: 2