This new site uses the “Midnight” theme for Hugo which includes support for plugins. I decided I wished to embed a twitter feed in the side-bar but had some difficulty getting this to work.

I defined the plugin widget file as follows:

SITE_ROOT/layouts/partials/sidebar/twitterfeed/widget.html

Then was trying to get it working with the following toml configuration:

    [params.sidebar.twitterfeed]
        [params.sidebar.twitterfeed.partial]
            path = "sidebar/twitterfeed/widget.html"
            cache = true

This failed with an error that it was unable to find the widget. An inspection of the theme suggested I had to define a ‘path’ element - something the documentation example is not clear on being required:

    [params.sidebar.twitterfeed]
        path = "sidebar/twitterfeed"
        [params.sidebar.twitterfeed.partial]
            path = "sidebar/twitterfeed/widget.html"
            cache = true