Unable to publish site - not sure what im doing wrong

I’ve completed building my site using the toha theme but I seem to be unable to deploy my website no matter what I try. My page either cannot be found or my the site does not render properly and there’s nothing in the documentation I haven’t tried. Can anyone point me in the right direction or tell me what to fix?
The files I’m using to deploy can be found as - https://github.com/SamuelLawrence876/Hugo-toha-theme-deploy.
The files I used to generate the website can be found at - https://github.com/SamuelLawrence876/Hugo-Toha-files. Any help would be appreciated really

How are you wanting to host your site?

There’s information on how to host (for free) on services such as Github pages or Netlify in the docs

I’ve tried both, on github the website dosn’t render the html and it looks like a site with just images and texts, while netlify gives me an error message that looks like: https://i.imgur.com/AO12Tu0.png

Which repository have you connected to Netlify?

Netlify doesn’t need you to build the HTML yourself (though you could do that on your local machine, and then just drag-and-drop to deploy). The best way to use Netlify is to have it build your site, so point it to https://github.com/SamuelLawrence876/Hugo-Toha-files.

The problem with Github (I’m guessing) is that your baseURL setting is incorrect and so the generated HTML file is pointing to the wrong location for the CSS files.

I’ve tired both and get the same exact error, even when i try to deploy on to github I get a broken looking site still looking lik- https://samuellawrence876.github.io/Hugo-toha-theme-deploy/. You are probably right that my css files arn’t being directed to but i have my base url as the site domain im trying to use. what should it be instead?

I haven’t used GitHub pages, but I don’t think you’ve followed the tutorial

According to those instructions, you should be deploying to the /docs file within your repository, rather than having a separate repository for the deployed site.

If you’re going to deploy to https://samuellawrence876.github.io/Hugo-toha-theme-deploy/, then you should set baseURL = 'https://samuellawrence876.github.io/Hugo-toha-theme-deploy/' or run hugo server --baseURL https://samuellawrence876.github.io/Hugo-toha-theme-deploy/

I’ve tried both and it dosn’t seem to work sadly. when I run

hugo server --baseURL https://samuellawrence876.github.io/Hugo-toha-theme-deploy/

The web page doesn’t seem to render at all either

That’s cause I made a typo :blush:. I meant

hugo --baseURL https://samuellawrence876.github.io/Hugo-toha-theme-deploy/

(Running hugo server is the testing/development environment.)

But I just checked your site and it looks like you’ve made some progress.

You need to set baseURL here

Your style/theme won’t load because the generated HTML files doesn’t correctly reference the location of the CSS files. See

The link /assets/css/bootstrap.min.css won’t work. You need it to say https://samuellawrence876.github.io/Hugo-toha-theme-deploy/assets/css/bootstrap.min.css…but Hugo won’t do that unless the baseURL value is set correctly.

Your theme doesn’t work when deployed to a sub directory. This is a result of hardcoding assets path like this in the templates.

The proper way is to build the path with “relURL” like this:

Fix this in all places and set baseURL to “https://samuellawrence876.github.io/Hugo-toha-theme-deploy/” and the site will work.

See example here https://frjo.github.io/Hugo-Toha-files/ (will delete it soon)

thanks for this frjo, i’ve been trying to refer to the repo you posted to get results where i’ve tried:

Thank you so much for you help, the problem was actually two things,
1 - the base url was what you said it needed to be
2 - i had to add an element to the config file: relativeurls: true which seem’d to fix everything

Thank you so much for you help, an update on the problem it was actually two things,
1 - the base url was what you said it needed to be
2 - i had to add an element to the config file: relativeurls: true which seem’d to fix everything