Commit Graph

4 Commits

Author SHA1 Message Date
Phillip Whittlesea-Clark
65ad575c9c Support Hugo Markdown Attributes for Inline Images 2025-11-01 18:21:42 +00:00
ZhenShuo Leo
90e553541e fix: enable wrapStandAloneImageWithinParagraph by default
This fixes invalid HTML where figure tag is inside p tag.
However, this does not fix linked images, e.g., `[![alt](image)](url)`.
The cleanest way to resolve linked images is using markdown-attributes,
but markdown-attributes is not recommended by CommonMark.

See:

- https://discourse.gohugo.io/t/how-to-do-wrap-img-with-a-inside-figure-with-render-image-html/44843
- https://github.com/gohugoio/hugo/blob/master/markup/goldmark/images/transform.go
- https://gohugo.io/content-management/markdown-attributes/
- https://github.com/commonmark/commonmark-spec/wiki/Deployed-Extensions#attributes
2025-10-11 15:07:20 +08:00
ZhenShuo Leo
e26d1c7e74 🔧 chore: move markup config to markup.toml 2025-05-29 01:46:50 +08:00
Nuno Coração
8fbdecb6e7 initial commit 2022-09-10 20:05:37 +01:00