If you like my work, please consider supporting its development.

This page describes the particulars of integrating shortcodes with Midnight. It should be considered supplemental to the documentation for general plugins.


The plugin type for shortcodes is shortcodes. So the configuration for the math shortcode would be under params.shortcodes.math instead of params.plugins.math.


The name of the shortcode in the configuration must be the same as the name of the shortcode when used in a content page. So if the shortcode is used via {{< my-awesome-shortcode >}}, the configuration must be under params.shortcodes.my-awesome-shortcode.

Partial Loading

Midnight automatically detects if a configured shortcode has been used on a given page and, if so, loads the necessary head and foot partials to make it work (the css partial is only called once, when generating the site CSS file).