Partials reusability and a general purpose widget principle

Hello everybody,

I already have a Wordpress site and am currently considering migrating to a static site generator. I am especially considering Hexo (as I have already used it) and Hugo (because the project is good in documentation and community, which is a factor of sustainability).

Is there a Wordpress-like widget solution inside Hugo? I am thinking about inserting parts of HTML code, like menus and post lists for instance, in several places.

I think the solution may be in Hugo partials, but IMO this makes reusability difficult.

What do you think about it? Thank you by advance.

What kind of widgets do you have in mind? What would be the limitations that you might expect to face?

The partial approach worked at least for me. In one of my themes I used them to create a tag clound and a recent-articles widget.

Hello @digitalcraftsman, I am thinking of some most classical widgets: menus, post lists, etc.

I assume a lot of people want to do similar things inside their themes. I also understand Hugo is intended to be general purpose (and so, with a bit of “low-level” inside), but I guess the community would benefit on it.

Imagine Wordpress without its widgets: everybody would have to hardcode their ones inside the themes. This is obviously OK for personal websites (which is my present use case for Hugo), but what about a professional activity?

For instance, what about proposing partials the same way themes are shown?