Errors when running generateThemeSite.sh

I’m developing a theme and am now ready to test it against the hugoThemes site locally.

Following the steps in the hugoThemes README section Testing a theme with the Hugo Themes website Build Script, I am getting errors when running generateThemeSite.sh.

The recurring error for each theme it tries to process:

==== PROCESSING .github ======
cp: cannot stat ‘/c/Hugo/Sites/hugoThemes/.github/images/screenshot.png’: No such file or directory
cp: cannot stat ‘/c/Hugo/Sites/hugoThemes/.github/images/tn.png’: No such file or directory
./generateThemeSite.sh: line 209: /tmpconfig-.github.toml: Permission denied
./generateThemeSite.sh: line 210: /tmpconfig-.github.toml: Permission denied
Building site for theme .github using config “/tmpconfig-.github.toml” to …/themeSite/static/theme/.github/
Error: Unable to locate Config file. Perhaps you need to create a new site.
Run hugo help new for details.

FAILED to create demo site for .github
cat: /c/Hugo/Sites/hugoThemes/.github/theme.toml: No such file or directory
cat: /c/Hugo/Sites/hugoThemes/.github/readme.md: No such file or directory

I’m on Windows 7 (32-bit) and use Git Bash. Here’s the output of hugo env:

Hugo Static Site Generator v0.48 windows/386 BuildDate: 2018-08-29T06:35:12Z
GOOS="windows"
GOARCH="386"
GOVERSION="go1.11"

Here’s a gist of the full error output: Output after running generateThemeSite.sh · GitHub

My guess is that it’s not recursively pulling each git submobule, but am not sure. Any help appreciated.

Edit: fix link to README section

Just checked the Netlify build setup to see if I missed something magic:

So, yes – Netlify does a “git clone --recursive” by default.

Thank you, that got me further.

I deleted the hugoThemes repo locally and re-cloned it with:

git clone --recurse-submodules -j8 https://github.com/gohugoio/hugoThemes.git

Now when running generateThemeSite.sh I am getting many symbolic link errors:

ln: failed to create symbolic link ‘/c/Hugo/Sites/hugoThemes/_script/hugoThemeSite/exampleSite2/themes’: No such file or directory

Here’s a gist with the full error output: Output of generateThemeSite.sh, take two · GitHub

Am contemplating moving everything over to an ubuntu VM since this issue may be Windows related.

Yes, now I vaguely remember that we create some symlinks as part of that build. And symlink creation requires “admin priveleges” on Windows.

That said – that script wasn’t, as you’ve experienced, not written for “genera consumption”: The most important part about a theme is that it can build the demo site with a baseURL set to a sub folder.

Tried running Git Bash as an Admin but still same results.

Good to know. I think I may go the ubuntu VM route as I’d still like to see what my theme looks like locally in the hugoThemes site.

Thanks for your help :+1: