How to use section name as hugo categories?

I have made categories according to directory for my markdown files。
But,I got hugo called the directory as section
can I use section as hugo categories rather than hard code in file content?

You can do that. There are plenty of functions that help you:

The problem is, to wrap your head around how to retrieve the information for your sections categories.

Get All Categories:
Load the root index page and use .Sections

Get Current Category:
Load the .Section of the current page and then do a get page on that section to retrieve more info

This way you can’t do multiple categories per page. But in general it’s possible. You will need to keep the sections/categories thingy in mind if you ask for help later on :wink: