feat: front-matter image accepts {{media:...}} (S3 hero photos consistent with body)
This commit is contained in:
@@ -221,6 +221,8 @@ func (c *Content) loadFile(full string) (*Article, error) {
|
||||
// resolve {{media:...}} and {{embed:...}} shortcodes in the SOURCE first,
|
||||
// so they also work inside markdown links 
|
||||
bodyText = resolveShortcodes(bodyText, c.MediaBase)
|
||||
// allow {{media:...}} in front-matter too (hero/cover image from S3)
|
||||
a.FM.Image = resolveMedia(a.FM.Image, c.MediaBase)
|
||||
|
||||
// render markdown -> html
|
||||
a.BodyHTML, err = c.renderMarkdown(bodyText)
|
||||
|
||||
Reference in New Issue
Block a user