Hugo site doesn't deploy to custom domain

352 views Asked by At

I recently created a personal blog site with custom theme using HUGO (source). It deploys on netlify (link) perfectly. But I wanted to publish it on my own domain (mydomain.xyz/pen). I already have a portfolio on mydomain.xyz, therefore I want to publish on a subdomain (/pen).

I tried using github pages for that but it is showing weird result without any theme (just raw HTML).

Can someone tell me how can I resolve this issue? If necessary, I can also publish using netlify but on my own custom domain.

1

There are 1 answers

0
Jack Taylor On

It sounds like the links to your static files (CSS, JS, etc.) are broken, and so the CSS isn't getting loaded. Are you setting the baseURL configuration option correctly? If this is set to the root of your domain (https://mydomain.xyz) instead of the subpage (https://mydomain.xyz/pen) then this could lead to the links being broken.

If that doesn't work, then let us know what theme you are using, and let us see your configuration file (with any sensitive info redacted). This will enable us to check if there is a problem in how your theme is displaying the static content, or whether there are any other issues with your config file that are causing the links to break.