Hugo theme papermod works on localhost but not on github pages

Hi,

I have been trying to get a basic theme look (which I will customize later) on github pages.
The theme I want: hugo-PaperMod
When I do hugo server it gives me a localhost link which upon clicking gets me to the theme. it works it builds. however, it doesn’t work on the github pages website
I changed baseURL to http, https, without the forward slash with the forward slash. I read up most of the related issues on this topic in this forum, but most of them had errors in the inspect element. I don’t. My website that I intend to use PaperMod on: my website I tried capitalizing and removing the baseURL too. What am I mising?

I am working on windows so it could be issues related to LF or CRLF line endings.

Any help will be appreciated.

1) Where is the GitHub Pages workflow file?

2) You should have one configuration file, not three:

image

3) Why do you have a hugo-PaperMod directory in the root of your project? Delete it.

image

oh. I meant to clone it into the themes folder. I think i managed to do it both places. And I initially had hugo.toml but it didn’t work so i kept adding and deleting to see which one would work. I thought hugo.toml was working for local server so id need config.toml. which one of the three should I keep? and I will delete the directory immediately.

Consolidate your config into the hugo.toml file.

You also don’t have a GitHub Pages workflow file. Follow the directions:
https://gohugo.io/hosting-and-deployment/hosting-on-github/

1 Like

Now you have two workflow files. Pick one.

image

1 Like

I picked hugo.yaml What am I missing now?

Your only content is in draft mode.

image

Also, don’t keep the public directory or .hugo_build.lock under source control.

git rm -rf public
git rm .hugo_build.lock

Then create a .gitignore file in the root of your project:

public/
resources/
.hugo_build.lock

Then check the .gitignore file into source control.

I wanted to have the profile mode on so I thought the theme would cover it.

Hence I didn’t add content hoping to atleast see some boiler codes. Have few information in the first page and more later. Its why most of my params in the config file are profile mode. So do you know what i am doing wrong? Thank you for the help thus far.

I suspect you missed steps 3 and 4 here:
https://gohugo.io/hosting-and-deployment/hosting-on-github/#procedure

Not to put too sharp an edge on this, but it appears you went through this exercise in a hurry without paying attention to details.

My apologies. I had been going through multiple solutions online which said to switch to branch control and such. Could you tell me why removing the hugo_build.lock helped load the website?

This is just good housekeeping.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.