mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Add render template hooks for links and images
This commit also * revises the change detection for templates used by content files in server mode. * Adds a Page.RenderString method Fixes #6545 Fixes #4663 Closes #6043
This commit is contained in:
@@ -17,6 +17,7 @@ package pandoc
|
||||
import (
|
||||
"os/exec"
|
||||
|
||||
"github.com/gohugoio/hugo/identity"
|
||||
"github.com/gohugoio/hugo/markup/internal"
|
||||
|
||||
"github.com/gohugoio/hugo/markup/converter"
|
||||
@@ -47,6 +48,10 @@ func (c *pandocConverter) Convert(ctx converter.RenderContext) (converter.Result
|
||||
return converter.Bytes(c.getPandocContent(ctx.Src, c.ctx)), nil
|
||||
}
|
||||
|
||||
func (c *pandocConverter) Supports(feature identity.Identity) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// getPandocContent calls pandoc as an external helper to convert pandoc markdown to HTML.
|
||||
func (c *pandocConverter) getPandocContent(src []byte, ctx converter.DocumentContext) []byte {
|
||||
logger := c.cfg.Logger
|
||||
|
Reference in New Issue
Block a user