Hi there,
I’m serving a static website on AWS (code is on S3 bucket and redirected to mydomain.com
) with Hugo (version v0.69, extended). The site runs correctly, except when i try to share a blog (the theme used is Meghna).
The partial is as follows (sample with the LinkedIn part) :
{{ $url := printf "%s" .Permalink | absLangURL }}
<a class="resp-sharing-button__link"
href="https://www.linkedin.com/shareArticle?mini=true&title={{ .Title }}&url={{ $url }}"
target="_blank" rel="noopener" aria-label=""> ...</a>
My issue is : the blog post is at https://mydomain.com/blogs/the-blog, but when i want to share, the absLangURL
is just /blogs/the-blog (i’m guessing it does not resolve the baseUrl
). So i’ve got an error on each website i try to share (twitter/reddit/linkedin/facebook etc) due to a misconstuction of the url.
When i run locally on my machine, the absLangUrl
is http://localhost:1313/blogs/the-blog. S3 seems to be the problem then.
Any tips on how to resolve this please ?
Thanks in advance !