markdown-pp icon indicating copy to clipboard operation
markdown-pp copied to clipboard

any advices on where to process images path in md # INCLUDE module

Open fujohnwang opened this issue 7 years ago • 1 comments

since I can !INCLUDE a md file into a merged one, but the md file to be included may have relative path point to some images, the final merged md may have a wrong image path reference, when compile with pandoc or some markdown processor, the path link will broken.

do u guys have any advice on how to handle such situation?

let's say, index.mdpp INCLUDE chapters/chapter1/section1.md, and section1.md refers to relative images/image1.png, in generated index.md, the image path should be chapters/chapter1/images/image1.png

index.mdpp
index.md (generated)
chapters/
     chapter1/
          images/
               image1.png
          seciton1.md
          section2.md
          ...
     chapter2/
.....

fujohnwang avatar Mar 27 '18 06:03 fujohnwang

I write a simple bash scripts to shift the image path before markdown-pp.

you guys who is interested can refer to such sample template project: https://github.com/keevol/pandoc_book_starter

fujohnwang avatar Mar 27 '18 15:03 fujohnwang