-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Different behaviour between "hugo" & "hugo server" for baseURL #7376
Comments
I just tested with the dev version who takes care of this (#7357) but same behavior. |
yep. not just trailing slash as well; if you have a baseURL like |
I do not see this behaviour (0.72.0). i get hugo server : en : <a href="http://localhost:1313/test/en">http://localhost:1313/test/en</a><br> hugo : en : <a href="https://www.mysite.org/testen">https://www.mysite.org/testen</a><br> |
@divinerites correct, i was mistaken. |
And to be clear, the point is not "do I have a trailing But why do we have a different behaviour between |
Simple example:
Then run:
This behavior has been around for years, at least as far back as v0.54.0, and probably much earlier. Avoid this by always including a trailing slash in site configuration. Per the docs:
I wish Adding a trailing slash, if missing, when running Removing the trailing slash when running |
I agree, but once we get a grip of what is the actual API and generate reference docs from it, we can at least start by hiding stuff that should not be exposed in the first place, e.g. |
Closing as duplicate of #11669. |
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. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
yes
I just noticed that I had a different behaviour between
hugo server
andhugo
when it comes to (I think) multi-language and trailing /.So i created a minimal repo (https://github.com/divinerites/mytest) where you can see it happening. I also commited the /public folder so you can also see the problem on the generated HTML.
baseURL = "https://www.mysite.org"
highres
in 3 languages.hugo server
it works fine. You can click and link to all my pages and translations.The line showing this problem is :@
In this (right) "live server" generated code you can see that i get a
/
after theabsURL
.When I generate the HTML using just
hugo
, the/
after theabsURL
is not generatedThis comes from the
public
folder :I have this live on one of my site for this specific code.
All the remaining (complex) code works fine.
For the record this is my real code :
The text was updated successfully, but these errors were encountered: