feat: front-matter image accepts {{media:...}} (S3 hero photos consistent with body)

This commit is contained in:
sam
2026-09-09 15:44:46 +10:00
parent 546f914789
commit 684bbed645

View File

@@ -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 ![...]({{media:x}})
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)