I’m having a crash-course in Jekyll et al. I am generating HTML from DITA, and using that as the source for my Jekyll generated site. It is going smoothly but one problem I am stumped on is the handling of images. My DITA source has the images in subdirectories of the source pages. The result is an structure like this:
In the generated HTML, the hrefs are relative. In topicA, the path to the image is _media/image1.png. If topicB references the same image, it is ../folder1/_media/image1.png.
Everything I read about Jekyll says I need to treat the images as “assets” (maintained in a separate folder). When I build a project, the image links are all broken because the images are not copied to the subfolders along with the rendered pages (in the _site folder).
Any suggestions as to how I might solve this problem? I dread the thought of trying to separate out the images from the generated HTML. And I don’t yet understand enough about Jekyll to do this in the rendering process.
Indeed. I am assuming most devs or at least beginners are using Jekyll 3 if GH Pages is the main platform for Jekyll. And that this difference is clear in the 3 to 4 guide.