-
Hello, thanks for Marp, is really awesome.
when I build the presentation with Am I doing something wrong or is it supposed to work this way? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Plus, I tried adding |
Beta Was this translation helpful? Give feedback.
-
In this case, the root directory of outputted HTML has become So you must specify resources by the absolute path with ![bg](file:///Users/xxxxxxxx/marp/images/foo.png) If you don't want to replace paths, (undocumented) # .marprc.yml
# Set "baseUrl" to the absolute path for an original Markdown
baseUrl: file:///Users/xxxxxxx/marp/slides.md marp -c .marprc.yml -o ~/Desktop/slides.html slides.md |
Beta Was this translation helpful? Give feedback.
In this case, the root directory of outputted HTML has become
~/Desktop/
so the browser will find out the image from~/Desktop/images/foo.png
. Marp will not try to modify relative paths for the resource. Respects specified paths in Markdown.So you must specify resources by the absolute path with
file:
scheme if you want to place HTML in anywhere of local file system.If you don't want to replace paths, (undocumented)
baseUrl
option for Marp CLI >= v1.0.2 might be useful to set the assumed file path for relative path resolution. It cannot set through CLI options but can set via a config file.