Display “page type” (section) while listing pages

Suppose I have three types of content: “blog”, “articles” and “tutorials” in my hugo site:

└── content
    ├── blog
    |   ├── vacation.md
    |   └── recipe.md
    ├── articles
    |   ├── ipad-pro.md
    |   └── energy-balance-model.md
    └── tutorials
        ├── typescaling.md
        └── css-grid.md 

When I list all the posts, I want the “type” of the post printed next to it, something like this:

List of Posts:
Blog: Vacation in Hawaii (June 29, 2022)
Article: The New iPad Pro (June 25, 2022)
Blog: New Keto-Friendly Recipe (June 15, 2022)
Tutorial: Typescaling with clamp() (June 3, 2022)
Article: Energy Balance Model of Obesity (May 22, 2022)
. . .

How do I print the “type” (taxonomy? section?) of each post?

So far I’ve tried using .Term, .GetTerms, .Data.Terms, etc. Perhaps I don’t know how to use it correctly?

Okay, I should’ve read the documentation a bit deeper. Using {{ .Section }} does the job.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.