Tag cloud: names and keys

Greetings!

This post is sequel to my earlier (and first) multi-question post about Hugo.

So, I have two sites built with Hugo. Both are also publicly githubbed:

On both sites I have cloud tag in fat footer, programmed as described in Hugo doc here, point 4, Rendering a Site’s Taxonomies. In the tag cloud there are, however, tag keys, and I want tag names. So, not informacijski-sustavi, and neither vernor-vinge, but informacijski sustavi and Vernor Vinge.

How to do that?

I haven’t found any example among showcase themes and sites, neither exact question on this distinguished forum.

And how to kill capitalization of tags when used as titles, for example here: http://koris.hr/tags/mobilne-aplikacije/ (I want mobilne aplikacije, and not Mobilne Aplikacije) ?

I was searching around and came upon this thread. I don’t know if you eventually solved this, but here’s what I did when I encountered a similar thing with post categories: I made a categories parameter in my config.toml that is a list of every category I have so far.
[params] categories = ["foo","bar"]

Then I looped through that list and just urlized to get the link.
`{{ range $name := .Site.Params.categories }}

  • {{ $name }}
  • {{ end }}`

    Of course, the downside to this approach is that I have to remember to add to the list each time I add a new category. This is doable for categories, but for tags, as in your case, it would get really tedious really fast, although your home page doesn’t look like it has too many tags (at least I presume they’re tags in the footer, I don’t know any Croatian). For tags I just used the keys.

    Hello. My website https://stoned.io has a tag cloud in the side panel mobile menu, for which the source code is as follows.

    <div class="tag-cloud">
            <h3>Tags</h3>
    
            <ul class="shadow">
                {{ range $name, $taxonomy := .Site.Taxonomies.tags }}
                <li><a class="shadow" href="/tags/{{ $name | urlize }}">{{ $name }}</a></li>
                {{ end }}
            </ul>
    
        </div>
    

    If I understand you correctly, I think you’re looking for the tags, without having to add them manually. This way, the tag cloud is based on the front matter of the article, which can be defined in your archetypes.

    I hope that this helps.
    Sincerely,

    Hash