Add ".html" to taxonomy pages

Hi, it seems like uglyURLs does not add index.html to taxonomy pages.

So I wanted to add it with this template, if I have set uglyurls to be true in my config.toml :

<div class="tags">
{{ range . }}
    <a class="button is-link"
       href="{{ "/tags/" | relURL }}{{ . | urlize }}{{ if $.Site.Params.uglyurls }}.html{{ end }}">{{ . }}</a>
{{ end }}

but I get this error, what is happening, could you help me ?

can't evaluate field Site in type []string