okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
251 stars 133 forks source link

Social media footer links broken on deployment #872

Closed spearw closed 2 years ago

spearw commented 2 years ago

Is this a BUG REPORT or FEATURE REQUEST?: bug

What happened:

On deployment to S3, social media links in the Footer fragment are broken. Instead of linking to the social media page, they create a relative link with the website URL first, followed by the social media page.

What you expected to happen:

Social media links correctly link to the appropriate page

How to reproduce it (as minimally and precisely as possible):

Deploy a website and follow a social media link from the footer fragment (does not occur in local 'hugo server' site)

Anything else we need to know?:

The fix I found is changing layouts/fragments/footer.html

line 30: <a href="{{ .URL | relLangURL }}" class="ignore-color-change

to this:

line 30: <a href="{{ .URL | absLangURL }}" class="ignore-color-change

Changing from a relative URL to an absolute URL seems to solve this issue. Happy to create a PR and implement the fix if given push access.

Environment:

stp-ip commented 2 years ago

Fixed in #873. Thanks