hugo version)?$ hugo version 0.63.1
yes
When running hugo serve -D --buildDrafts --buildFuture -disableFastRender, {{ .Site.BaseURL }} returns http://localhost/.
When running with Netlify, it returns https://dev--jasik-xyz.netlify.com with no trailing slash.
This could be an implemenation inconsistency between Netlify and hugo, but maybe rewriting double slashes to single slashes would be the right move?
https://github.com/jasikpark/jasik-xyz/commit/0814c7a0f6ac27864079678ad8979a18cc5e4c28
@jasikpark
I am sure that the implementation will be same but the build settings are different between Netlify and local server.
$DEPLOY_PRIME_URL in netlify.toml has no trailing slashHugo already has some solutions for this problem.
For example you can write this with absURL like
<a rel="me" href="{{ "/about/" | absURL}}">About</a>
Or, in this case, you can just remove {{ .Site.BaseURL }}
<a rel="me" href="/about/">About</a>
Ok, cool — I’m definitely looking for the absURL function in that case!
Caleb Jasik
[email protected]
https://jasik.xyz
On February 15, 2020 at 2:20:14 PM, satotake ([email protected]) wrote:
@jasikpark
I am sure that the implementation will be same but the build settings are different between Netlify and local server.
$DEPLOY_PRIME_URL in netlify.toml has no trailing slash
Hugo's local server's base url has a trailing slash
Hugo already has some solutions for this problem.
For example you can write this with absURL like
About
Or, in this case, you can just remove {{ .Site.BaseURL }}
About
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
We only modify the `baseURL´ when running the server.
@jasikpark if you are ok, could you close this?