Use minimo's [recent_posts] widget in the menu

Hello, just getting started, I would like to use the [recent_posts] widget of the minimo theme as one item in the menu.

I already figured out how to add urls to the menu, but is it possible to add the widget,too?

Kind regards,

Yes. Look at how the widget is made, and adjust it to the theme you are using.

If you run into trouble, please read the docs and Requesting Help.

Thanks for reading and replying.

I now looked into the layouts/partial directory of minimo and found a “recent_posts.html”, which looks like a template mixing html with {{xx}} snippets. However, I still don’t know how to use this when defining the menu. I tried:

name = “Artikel”
weight = -10
identifier = “recent_posts”
url = “{{ partial recent_posts . }}”

and url={{recent_posts}} and url=“recent_posts”, all without success.

Any hints?

There is the “concept” of a menu, and there is the menu system in Hugo.

So, we can use the menu system to create the concept on a given site. Does that make sense? But you can obviously do it without the Hugo menu system. You could just make links in your template, or even load recent posts.

When you use a menu template, you can include other things next to the output from the menu system. You can include partials at that point. But your example above, that is a configuration file, partials are reusable template code.

Thanks again. I found the solution to use /post/ as url which lists the articles in a paginated way by date, just I want it. So just for reference, this works for me:

name = “Articles”
weight = -10
identifier = “recent_posts”
url = “/post/”

Looks like a cool framework to me.

You can’t add a widget in the menu, you can only add links.

For more info: Minimo docs