Hugo: How to get the tags set on the current page
Date: 2020-01-08 | hugo |
DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)
problem
I use Hugo to statically-generate my sites. In one of my templates, I want to be able to get the tags set on a current page. How can I get those?
solution
Here's how you can get the tags of the current page:
{{ .Param "tags" }}
This will display the tags set on the current page (if they exist). Seriously, you can just pop that into a template and they'll appear.
Want more like this?
The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.