URL Domain prepending

  1. When sharing code in the forums, use code fences not blockquotes. See https://discourse.gohugo.io/t/sharing-code-in-the-forums/8968.
  2. The code displayed in your original post does not match the code in your repository. See #1.
  3. You should run your final HTML through a validator such as https://validator.w3.org/. You’ve got some issues.
  4. The urlize function does not do what you think it does. In this case, its misuse caused your problem. Do this instead:
<div style="color:grey; font-size:16px;">
  {{ if .Params.refs }}
    <strong>References:</strong><br>
    {{ range .Params.refs }}
      &nbsp;&nbsp;<a href="{{ . }}">{{ . }}</a><br>
    {{ end }}
  {{ end }}
</div>
1 Like