How to show only categories in posts {HUGO}

How to display categories only, with the code below. please

{{ $params := .Params }}
               {{ range $key, $value := $.Site.Taxonomies }}
               {{ if isset $params $key }}
               <span>
               <a href="{{ "https://www.example.net/" | absURL }}{{ $key | urlize }}/">{{ $key | upper }}</a>
               </span>
               <ul>
                  {{ range (index $params $key) }}
                  <li><a href="{{ "https://www.example.net/" | absURL }}{{ $key | urlize }}/{{ . | urlize }}/">{{ . }}</a></li>
                  {{ end }}
               </ul>
               {{ end }}
               {{ end }}

Thank you in advance :smile:

.Site.Taxonomies is a multi dimensional array containing all your taxonomies. Since you want to get the categories you can get and enumerate them like this: range .Site.Taxonomies.categories. It would be probably safer to wrap an isset .Site.Taxonomies "categories"around to avoid any error if there’s no category yet and thus the key is not set.

Oke thanks, Mas bro :rofl: :grinning:

this work…

Categories: 
		 
		 {{ $params := .Params }}
         {{ range $key, $value := $.Site.Taxonomies.categories }}
			   
            <a href="/categories/{{ $key | urlize }}/" rel="category tag">{{ $key | upper }}</a>	
         
		 {{ end }}