Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Commit

Permalink
Re-apply temporary workaround to generateThemeSite.sh
Browse files Browse the repository at this point in the history
@digitalcraftsman was trying to re-apply this workaround
in commit 3068f64,
but for some reason that commit contains whitespace cleanup only.
The following commit message was from that commit:

Setting the theme path via the `-t THEME` flag isn't recognized
and still requires to use the HUGO_THEME env variable as workaround.

See #412
See gohugoio/hugo#5061
See gohugoio/hugo#4851

This reverts commit 0b4e98b.
  • Loading branch information
anthonyfok committed Sep 12, 2018
1 parent 484cbff commit 3e9282e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _script/generateThemeSite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ for x in `find ${themesDir} -mindepth 1 -maxdepth 1 -type d -not -path "*.git" -
ln -s ${themesDir}/$x/exampleSite ${siteDir}/exampleSite2
ln -s ${themesDir} ${siteDir}/exampleSite2/themes
destionation="../themeSite/static/theme/$x/"
hugo --quiet -s exampleSite2 -d ${demoDestination} -t $x -b $BASEURL/theme/$x/
HUGO_THEME=${x} hugo --quiet -s exampleSite2 -d ${demoDestination} -b $BASEURL/theme/$x/
if [ $? -ne 0 ]; then
echo "FAILED to create exampleSite for $x"
errorCounter=$((errorCounter + 1))
Expand Down Expand Up @@ -210,7 +210,7 @@ for x in `find ${themesDir} -mindepth 1 -maxdepth 1 -type d -not -path "*.git" -
cat themeSite/templates/${paramsConfig} >>${themeConfig}

echo "Building site for theme ${x} using config \"${themeConfig}\" to ${demoDestination}"
hugo --quiet -s exampleSite --config=${themeConfig} -d ${demoDestination} -t $x -b $BASEURL/theme/$x/
HUGO_THEME=${x} hugo --quiet -s exampleSite --config=${themeConfig} -d ${demoDestination} -b $BASEURL/theme/$x/
if [ $? -ne 0 ]; then
echo "FAILED to create demo site for $x"
rm -rf ${demoDestination}
Expand Down

2 comments on commit 3e9282e

@digitalcraftsman
Copy link
Member

@digitalcraftsman digitalcraftsman commented on 3e9282e Sep 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why my commit just contains whitespaces. I could swear to have copied the lines above to re-apply the workaround.

Thanks for noticing my mistake @anthonyfok 👍

@anthonyfok
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are welcome @digitalcraftsman!

I could swear to have copied the lines above to re-apply the workaround.

It is usually easier to use the git revert command instead.
In this case, I used git revert 0b4e98b.

Please sign in to comment.