Also, your editor app may well “understand” the Markdown syntax and be able to display its results in a preview window (as is the case with iA Writer, for example) - a handy capability that obviously won’t work with a Hugo shortcode, which such an editor will regard as just gibberish.For that matter, what if you’ve used the Markdown syntax for years and prefer it, if only for the sake of muscle memory?.What if you have a lot of existing Markdown files where you’ve already used the much simpler syntax, and you don’t want to change them out with shortcodes just to achieve image processing?.This post is about the render hook for images.Īs you may know, Markdown’s syntax for displaying images is fairly simple, involving only two required attributes and one optional one: More specifically, Hugo’s Markdown render hooks are templates which “hook into” standard Markdown syntax. In software development, a hook is a function that, as the name implies, lets you “hook into” other code, often to override that code’s usual results. Fortunately, that definitely is not the case, thanks to Hugo’s Markdown render hooks. It’s understandable that a reader of my various posts about image processing in Hugo, including the most recent, might get the idea that the only way to bring processed images into a Hugo content file is to use a shortcode. ![]() As a result, certain content on this page could be at variance with what you’re currently seeing on the site, but the two were consistent when this post originally appeared. General note: This site’s appearance, configuration, hosting, and other basic considerations will change over time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |