Use Double Quotation Marks in Hugo Shortcodes

Hongtao Hao / 2021-06-15


If you use single quotation marks ('') in Hugo shortcodes, say:

<figure src='media/home.jpg' caption='Home, sweet home'>

You’ll see this error when building your site:

got positional parameter 'XXX'. Cannot mix named and positional parameters

To solve this problem, simply use double quotation marks ("").

Last modified on 2021-10-05