Use proper URL for production builds

Signed-off-by: Pete Lumbis <pete@upbound.io>
This commit is contained in:
Pete Lumbis 2023-05-01 10:22:51 -04:00
parent 2f35739fdd
commit 2f25f3ce75
No known key found for this signature in database
GPG Key ID: FDC6C20960060000
1 changed files with 17 additions and 0 deletions

17
netlify_build.sh Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
LATEST_VER="1.12"
cp -R content/v$LATEST_VER content/latest
sed -i "s/^\s*version: \"$LATEST_VER\"//g" content/latest/_index.md
sed -i 's/# writeStats: true/writeStats: true/g' config.yaml
cat config.yaml
if [ $CONTEXT = "production"]
then
hugo --minify --baseURL https://docs.crossplane.io/
else
hugo --minify --baseURL $DEPLOY_URL
fi