How to add text above the categories URL in a page

Continuing the discussion from Using categories:

I understand that one can add a page and by adding just an URL for the category, you can have a page with posts from the category.

My requirement is that I would like to have an introduction to the category before I list the posts in that category.

Now when I add just some text, the URL is just displayed as an URL, instead of posts being displayed from the categories URL.

How can I achieve my use case.

There’s no built-in feature to achieve what you want, but it’s doable if you are comfortable writing custom Hugo templates or shortcodes. See this thread for more information.

1 Like

Thanks @sod!

The post you linked to, explains the concept, which I think I understand. But if it is not too much to ask, is there an example implementation that I can see and replicate?

I am currently reading Customizing your default Micro.blog templates to see if I can find examples that I can copy from.

The Hugo community is pretty big, so maybe there are examples out there, but I don’t have any on my mind, sorry. Someone in the Micro.blog community might have done this, so it could be worth asking on your blog to get the question out on the timeline. If you’re lucky, @jean or @manton will boost your post on the Discovery page for better reach.

1 Like