Closed cdupont closed 7 years ago
Hi, I've integrated diagrams-pandoc with my blog. Thanks! I have one problem with the images generated:
<img src="images/bbb63a1006746c4a.png" />
The problem is that the HTML page generated is not necessarily in the web root directory. So the code generated should be:
<img src="/images/bbb63a1006746c4a.png" />
or
<img src="../../../images/bbb63a1006746c4a.png" />
The image could also be encoded as image data URI.
For the moment I added a boolean field "pathSeparator" in Opts. I add a slash to the image name in function insertDiagrams:
if (_absolutePath opts) then pathSeparator : imgName else imgName
If you like this solution I can make a pull request.
This sounds good. A PR would be great. Can you expose _absolutePath in the command-line interface also?
_absolutePath
Closed by #13.
Hi, I've integrated diagrams-pandoc with my blog. Thanks! I have one problem with the images generated:
<img src="images/bbb63a1006746c4a.png" />
The problem is that the HTML page generated is not necessarily in the web root directory. So the code generated should be:
or
The image could also be encoded as image data URI.
For the moment I added a boolean field "pathSeparator" in Opts. I add a slash to the image name in function insertDiagrams:
If you like this solution I can make a pull request.