When in develop mode, that is, hugo server at http://localhost:1313,
.Site.BaseUrl has no trailing slash, but when I configured a baseurl in config.yaml,
and run hugo to build, the .BaseUrl is always trailed by a slash.
This makes it ugly when I want to do
{{ if .Params.otherlangs }}
{{ range $index, $lang := .Params.otherlangs }}
<a href="{{ $.Site.BaseUrl }}/{{ or (echoParam $.Params.otherurls $index) $lang }}">{{ index $.Site.Params.languages $lang }}</a>
|
{{ end }}
{{ end }}
When in develop mode, that is,
hugo server
athttp://localhost:1313
,.Site.BaseUrl
has no trailing slash, but when I configured abaseurl
inconfig.yaml
, and runhugo
to build, the.BaseUrl
is always trailed by a slash.This makes it ugly when I want to do
Links generated: