Share links missing baseURL

Hello - I’m using Hugo with the blowfish theme on my website at https://www.bobadams5.com/

Everything is mostly working, but sometime along the way the social media share links became broken. For example, if I went to one of my posts at Teardown of a Best Data PCMCIA 56k Modem · Bob Adams 5, the URL the share links use is just /posts/56k/ and missing the baseURL.

I have the baseurl = “https://bobadams5.com” in my config/_default/config.toml but for some reason just the share links seem to not work. Is this a base hugo configuration issue or something in the theme? Any advice for fixing this?

always end the baseURL setting with a trailing slash

baseURL = "https://bobadams5.com/"

retry and see.

if not it’s something around your config and the themes - no clue without code.

1 Like

Thanks for the tip - I added the trailing slash and it didn’t seem to solve my issue. For now, I found a workaround of building with

hugo -b https://bobadams5.com/

I would guess the baseURL is not defined in the right spot for my theme, I had been using hugo-clarity and moved to Blowfish, moved computers, fought issues with new lines differences in Linux & Windows, and all around made a jumbled mess. I’ll continue for now with the compilation flag, and maybe through some baseURL definitions in my other toml locations to see if I can get it working right.

In fact setting basURL in your sites config should be the same… just overruling the config one.

Do you have a config.toml in the root of your project and use a config folder.

Having both may break things

If you use environments: Only one baseURL definition per environment

A scan for that settind in your site will show up multiple definitions