New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
baseURL trailing slash should be consistent between site setting and flag #3262
Comments
It should be consistent. But manually creating URLs using Use |
thanks @bep, I'll give it a try! |
@bep as you say, that works perfectly. For future reference for searchers, doing:
... for the
... and for the
Thanks again! |
This makes it consistent with how it behaves when it's set in config.toml. This commit also unifies BaseURL in Site.Info so we now have one source for this value. Fixes gohugoio#3262
This makes it consistent with how it behaves when it's set in config.toml. This commit also unifies BaseURL in Site.Info so we now have one source for this value. Fixes #3262
This change is a bug fix and it also will break configurations that relied inadvertently on the old buggy code. It's a one-byte fix if you need the trailing slash. If you need it and don't use it, you'll get this behavior: https://discuss.gohugo.io/t/hugo-0-20-upgrade-page-template-breaks/6097 |
vjeantet/hugo-theme-casper#84 notes changes suggested to the Casper theme for 0.20. |
Casper theme has been updated with changes. |
See: gohugoio/hugo#3262 Signed-off-by: Ole Herman Schumacher Elgesem <oleherman93@gmail.com>
- lacked favicon when loaded from /ipns/ path - social media embeds had broken images This also fixes trailing slash issues mentioned in: gohugoio/hugo#3262 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
- lacked favicon when loaded from /ipns/ path - social media embeds had broken images This also fixes trailing slash issues mentioned in: gohugoio/hugo#3262 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
Signed-off-by: Chris Reddington <791642+chrisreddington@users.noreply.github.com>
…relURL function As recommended here: gohugoio/hugo#3262
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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:...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
The text was updated successfully, but these errors were encountered: