File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,19 @@ JUNIT_REPORT := $(shell which go-junit-report 2> /dev/null || echo "${ISTIO_BIN}
7272ISTIO_SERVE_DOMAIN ?= localhost
7373export ISTIO_SERVE_DOMAIN
7474
75+ # Determine the base URL for the Netlify-hosted site depending on the Hugo context.
76+ # 'production' context: Use site URL (istio.io, preliminary.istio.io or istio-staging.netlify.app)
77+ # 'deploy-preview' context: Use per-build URL (deploy-preview-16568--preliminary-istio.netlify.app)
78+ # any other context: use relative URLs
7579ifeq ($(CONTEXT ) ,production)
76- baseurl := "$(URL ) "
80+ NETLIFY_URL := $(URL ) /latest
81+ else ifeq ($(CONTEXT),deploy-preview)
82+ NETLIFY_URL := $(DEPLOY_PRIME_URL ) /latest
83+ else
84+ NETLIFY_URL := /latest
7785endif
86+ export NETLIFY_URL
87+
7888
7989# Which branch of the Istio source code do we fetch stuff from
8090export SOURCE_BRANCH_NAME ?= master
@@ -146,7 +156,7 @@ netlify_install:
146156
147157netlify : netlify_install
148158 @scripts/gen_site.sh
149- @scripts/build_site.sh " /latest "
159+ @scripts/build_site.sh " ${NETLIFY_URL} "
150160 @scripts/include_archive_site.sh
151161
152162# ISTIO_API_GIT_SOURCE allows to override the default Istio API repository, https://github.com/istio/api@$(SOURCE_BRANCH_NAME)
Original file line number Diff line number Diff line change 2121
2222[[edge_functions ]]
2323 path = " /v*"
24- function = " redirect-to-latest"
24+ function = " redirect-to-latest"
You can’t perform that action at this time.
0 commit comments