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?