Skip to content

baseURL trailing slash should be consistent between site setting and flag #3262

@RickCogley

Description

@RickCogley

Hello - it's been a while.

If I set a baseURL in my config.toml, such as http://www.mysite.com, when I use {{ .Site.BaseURL }}, no trailing slash is appended, so I'd compensate by adding one in the template.

Then, say if I want to publish the same content to http://anothersite.com/~myuser, I can override the baseURL in the hugo command when I generate like:

 hugo --config="/path/to/my/config.toml" --baseURL="http://anothersite.com/~myuser" -s /path/to/my/site/ -d /tmp/anothersite.com.myuser

...but, when doing this, it appends a trailing slash, so I don't need to compensate.

Should this not be consistent?

Using:
Hugo Static Site Generator v0.20-DEV-73C1C7B6 darwin/amd64 BuildDate: 2017-04-02T16:28:29+09:00

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions