Mathematical formulas written in LaTeX notation can be rendered to HTML on the client side by bundling the KaTeX library with the website.
Rendering can take place either globally, or in specific locations using a built-in shortcode.
Math can be rendered globally or on a per-page basis by setting the math parameter to true in the site configuration or on specific pages, and by enabling the passthrough extension in the site configuration.
If the math parameter is set to false, mathematical formulas can still by rendered by surrounding them with the math shortcode:
{{% math %}}
Inline formulas such as $y=ax+b$ are supported, displayed formulas as well:
$$e^{i\pi}+1=0$$
{{% /math %}}
As of 2024, it is not yet possible to render math on the server side with Hugo.
To enable emoji globally, set enableEmoji to true in your site’s configuration and then you can type emoji shorthand codes directly in content files; e.g.
The Emoji cheat sheet is a useful reference for emoji shorthand codes.
N.B. The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.
Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt.