mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
bea9280fb3
commit
bec2c1e37a
1 changed files with 16 additions and 3 deletions
|
@ -82,9 +82,22 @@ type htmlHandler struct {
|
|||
|
||||
func (h htmlHandler) Extensions() []string { return []string{"html", "htm"} }
|
||||
func (h htmlHandler) PageConvert(p *Page, t tpl.Template) HandledResult {
|
||||
// see #674 - disabled by bjornerik for now
|
||||
// p.ProcessShortcodes(t)
|
||||
p.Content = helpers.BytesToHTML(p.rawContent)
|
||||
p.ProcessShortcodes(t)
|
||||
var content []byte
|
||||
var err error
|
||||
|
||||
if len(p.contentShortCodes) > 0 {
|
||||
content, err = replaceShortcodeTokens(p.rawContent, shortcodePlaceholderPrefix, true, p.contentShortCodes)
|
||||
|
||||
if err != nil {
|
||||
jww.FATAL.Printf("Fail to replace shortcode tokens in %s:\n%s", p.BaseFileName(), err.Error())
|
||||
return HandledResult{err: err}
|
||||
}
|
||||
} else {
|
||||
content = p.rawContent
|
||||
}
|
||||
|
||||
p.Content = helpers.BytesToHTML(content)
|
||||
return HandledResult{err: nil}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue