During local development with Hugo v0.120.3, when running hugo server -D, it seems .Site.BaseURL gets replaced with localhost.
From the LinkedIn Post Inspector we can see LinkedIn won’t play nice when localhost is in the URL. So to still enable local dev, I would like to access the hugo.toml’s baseURL in certain places of my site when accessing .Site.BaseURL.
So my question is, when running hugo server -D, is there some way to still get access to the hugo.toml’s baseURL (and not localhost)?
Yeah I was playing around with this, the issue faced here is the rest of the site no longer works when manually passing hugo server -D --baseURL "https://foo.com".
I am wondering if there’s some way to have .Site.BaseURL be localhost everywhere but one (involving part with LinkedIn sharing). All good if not, it’s sort of snowflake-y thing
I was just trying absURL "" and it also resolves to localhost when running hugo server -D. Is there some way to have absURL resolve to the published URL? I don’t see anything about that in the absURL docs