I’m new to Hugo, so this may be an easy question, but I didn’t see the answer in the docs or forum…honestly, I’m hoping it is easy and I’m just missing something.
The forum is saying new users can have two links per post, but this is a URL problem. In this post, I’ve substituted “h:” for “https:” so it will let me post.
I’ve defined a variable in my content like so
refs: [“h://www.amazon.com”,“h://www.ciscopress.com”,“h://www.linkedin.com”]
and my baseURL in config.toml is baseURL = “h://www.nextpertise.net/”
and then want to reference it in my single.html template:
{{ if .Params.refs }}References: {{range .Params.refs}}  {{ . }} {{end}}{{end}}
The output text is right, but the URL being referenced is prepending my baseURL like this: “h://www.nextpertise.net/https://www.amazon.com”. What am I doing wrong?
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.