gokarna-theme / gokarna-hugo

A minimal opinionated theme for Hugo
https://gokarna-hugo.netlify.app
GNU General Public License v3.0
357 stars 139 forks source link

Social icons do not render #180

Closed ghost closed 1 year ago

ghost commented 1 year ago

Not sure if this is the same issue as https://github.com/526avijitgupta/gokarna/issues/88 or not, and either way I'm not sure how to proceed. My site is at https://richholmes.xyz, hosted at Dreamhost. The SVG icons in the header are rendered, but the social icons are not. When I do "hugo serve" locally they do render.

ghost commented 1 year ago

Error in the console is:

www.richholmes.xyz/:1 Access to XMLHttpRequest at 'https://richholmes.xyz/svg/icons/mastodon.svg' from origin 'https://www.richholmes.xyz' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

If I manually change

                <img class="svg-inject" src="https://richholmes.xyz/svg/icons/mastodon.svg" />

to

                <img class="svg-inject" src="svg/icons/mastodon.svg" />

then it works.

As far as I can tell everything on the site works if I set baseURL = "". Are there good reasons for not doing this?

526avijitgupta commented 1 year ago

Should be fixed now that https://github.com/526avijitgupta/gokarna/pull/178 is merged Please check @holmesrichards

ghost commented 1 year ago

Looks good, thanks!