@@ -22,6 +22,8 @@ import (
22
22
"github.com/gohugoio/hugo/markup/internal"
23
23
24
24
"github.com/gohugoio/hugo/markup/converter"
25
+
26
+ "path"
25
27
)
26
28
27
29
// Provider is the package entry point.
@@ -55,8 +57,8 @@ func (c *pandocConverter) Supports(feature identity.Identity) bool {
55
57
// getPandocContent calls pandoc as an external helper to convert pandoc markdown to HTML.
56
58
func (c * pandocConverter ) getPandocContent (src []byte , ctx converter.DocumentContext ) []byte {
57
59
logger := c .cfg .Logger
58
- path := getPandocExecPath ()
59
- if path == "" {
60
+ pandoc_path := getPandocExecPath ()
61
+ if pandoc_path == "" {
60
62
logger .Println ("pandoc not found in $PATH: Please install.\n " ,
61
63
" Leaving pandoc content unrendered." )
62
64
return src
@@ -74,7 +76,9 @@ func (c *pandocConverter) getPandocContent(src []byte, ctx converter.DocumentCon
74
76
arguments = append (arguments , "--csl" , bibliography .CitationStyle )
75
77
}
76
78
77
- return internal .ExternallyRenderContent (c .cfg , ctx , src , path , arguments )
79
+ arguments = append (arguments , "--resource-path" , path .Dir (ctx .Filename ))
80
+
81
+ return internal .ExternallyRenderContent (c .cfg , ctx , src , pandoc_path , arguments )
78
82
}
79
83
80
84
func getPandocExecPath () string {
0 commit comments