Skip to content

Instantly share code, notes, and snippets.

@samredai
Created September 23, 2022 15:22
Show Gist options
  • Save samredai/87d58090477941b19a0f06a86c69d7c8 to your computer and use it in GitHub Desktop.
Save samredai/87d58090477941b19a0f06a86c69d7c8 to your computer and use it in GitHub Desktop.
Hugo: Build the homepage and all versioned sites
hugo -s landing-page -d ../public --cleanDestinationDir --configDir ../config --environment landing-page
for VERSION in "$@"
do
hugo -s docs -d ../public/docs/${VERSION} --contentDir content/${VERSION}/ --configDir ../config --environment ${VERSION}
done
hugo -s docs -d ../public/docs/latest --contentDir content/$1/ --configDir ../config --environment $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment