Themes don't carry over on GitHub hosting

Hello all,

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: https://github.com/ucdavis/dtc

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?

Thanks!

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:

┌─[adam][Hapkido][±][master ✗][~/dtc/themes]
└─▪ 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 git@github.com:ucdavis/dtc.git
cd dtc
mkdir themes
cd themes
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. :frowning:

Oh, lol, here I am years later, doing the same thing with this site:

https://insecure.ucdavis.edu

Which uses this repository:

https://github.com/ucdavis/insecure

This time, the theme, ananke, is a submodule in the themes directory:

┌─[adam][hapkido][±][master ✓][~/insecure]
└─▪ cat .gitmodules 
[submodule "themes/ananke"]
	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:

https://insecure.ucdavis.edu/insecure/posts/setting-up-openbsd64/

Instead of:

And all fixed, by fixing my push script and changing the baseURL.