I’ve followed the tutorial for setting up Hugo on GitHub. I did the “Configure git workflow, the Alternate Way”.
The chosen theme, hugo-bootswatch, is not being applied. As far as I can tell, the css files for the theme are present, but somehow they aren’t getting used.
The repo in question is:
The gh-pages branch generates
https://ucdavis.github.io/dtc but no theme appears defined. You can even see the text for the Bootswatch theme in the footer.
What did I do wrong?
Hard to tell – as your repo is missing the theme submodule.
Hmmm. Okay, I just followed the directions in the documents.
When I try to add it as a submodule instead, I get:
└─▪ git submodule add -f https://github.com/nilproductions/hugo-bootswatch.git
Reactivating local git directory for submodule ‘themes/hugo-bootswatch’.
fatal: Pathspec ‘themes/hugo-bootswatch’ is in submodule 'themes’
Failed to add submodule ‘themes/hugo-bootswatch’
Try a fresh clone of your repo, then either add the full themes submodule, or make the ‘themes’ folder and add the hugo-bootswatch submodule there.
It seems like the submodule was added in a strange way. Rather than fixing the problematic version, starting from scratch is probably easier (DVCS for the win!).
Untested (sorry), but something like this:
git clone email@example.com:ucdavis/dtc.git
git submodule add https://github.com/nilproductions/hugo-bootswatch.git
git add themes/hugo-bootswatch
git push origin
Hope that helps/works!
Hi , I tried above work around, but it didn’t worked, I am using the hugo-minimalist-theme.
After executing hugo -t hugo-minimalist-theme , it seems the html files are not being rendered with respect to
the theme’s css.
Oh, lol, here I am years later, doing the same thing with this site:
Which uses this repository:
This time, the theme, ananke, is a submodule in the themes directory:
└─▪ cat .gitmodules
path = themes/ananke
url = https://github.com/budparr/gohugo-theme-ananke.git
But it still isn’t being applied. It was working before I did the CNAME.
Also, the posts on the front page of the site are incorrectly going to:
First, setup a USB install key:
brew install balenaetcher Pick the closest mirror to you to get the files. (I picked Sonic.net). The installation is the usual guided screens, you can safely...
And all fixed, by fixing my push script and changing the baseURL.