Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

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

Open
fujohnwang opened this issue Mar 27, 2018 · 1 comment
Open

Comments

@fujohnwang
Copy link

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant