mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Moving processing short codes to the page
This commit is contained in:
@@ -264,13 +264,6 @@ func (s *Site) checkDirectories() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (s *Site) ProcessShortcodes() {
|
||||
for _, page := range s.Pages {
|
||||
page.Content = template.HTML(ShortcodesHandle(string(page.Content), page, s.Tmpl))
|
||||
page.Summary = template.HTML(ShortcodesHandle(string(page.Summary), page, s.Tmpl))
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Site) CreatePages() (err error) {
|
||||
if s.Source == nil {
|
||||
panic(fmt.Sprintf("s.Source not set %s", s.absContentDir()))
|
||||
@@ -288,9 +281,8 @@ func (s *Site) CreatePages() (err error) {
|
||||
page.Section = file.Section
|
||||
page.Dir = file.Dir
|
||||
|
||||
// Handling short codes prior to Conversion to HTML
|
||||
page.Content = template.HTML(ShortcodesHandle(string(page.Content), page, s.Tmpl))
|
||||
page.Summary = template.HTML(ShortcodesHandle(string(page.Summary), page, s.Tmpl))
|
||||
//Handling short codes prior to Conversion to HTML
|
||||
page.ProcessShortcodes(s.Tmpl)
|
||||
|
||||
err = page.Convert()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user