Hi, I have created a Github Pages site with Hugo (theme Gokarna), but CSS does not seem to work: the dark/light mode is not available.
Steps
Create Github repo,
Locally run “hugo”. This creates a ‘public’ folder,
Push ‘public’ folder to Github Pages, as explained in Hugo basic usage documentation:
" In a simple hosting environment, where you typically ftp, rsync, or scp your files to the root of a virtual host, the contents of the public directory are all that you need."
The Gokarna example website has a CSS with a dark/light theme that can be set at the top right. My website does not show that option. Locally my website does show a dark/light theme.
Thanks for the help. I use the option “Deploy from a branch” on Github. But indeed I can see that this option triggers an action to build with Jekyll. I will read the documentation on Github Pages to see how I can turn off a Jekyll build.
Thank you @irkode and @jmooring for your help. I decided to use the workflow for hosting on Github. This means I had to push my “raw” website content to Github and run Hugo via the workflow from @jmooring.
I was under the impression that I could also run a static workflow on the “public” folder on Github, but as described above that did not work with the Gokarna theme.
You can use the content of a hugo build using Github actions → Static HTML.
But I’m with @jmooring. The workflow is easy to setup, easy to operate and stable. And you don’t have to separate source and publish. Just push sources and you’re done.