-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix: Site BaseURLs #16568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Site BaseURLs #16568
Conversation
Hi @Ajay-singh1. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Can you ping me on the Istio Slack please Ajay? |
/ok-to-test (I think you can join as a member now btw) |
0212a07
to
2c735ca
Compare
de2a06d
to
b7ca906
Compare
38adea3
to
7d41c93
Compare
@craigbox I have got a working solution now.We can check the sitemap for preliminary deployment and it is generating those sitemaps correctly.See :- Sitemap for Preliminary deployment. |
Co-authored by: Craig Box <[email protected]>
@craigbox We are very close! Fully qualified URLs from the deployment-preview. |
This will work correctly if the environment variables are set correctly in netlify. |
https://docs.netlify.com/configure-builds/environment-variables/#deploy-urls-and-metadata
Primary domains for the three sites are: istio.io, preliminary.istio.io, istio-staging.netlify.app |
Thanks! Craig , Let's merge this PR now.This will work 😀. When on When on When on When on All the URLs will be set correctly and Hugo will use this different baseURLs when building and deploying the site. |
Makefile.core.mk
Outdated
@@ -72,10 +72,20 @@ JUNIT_REPORT := $(shell which go-junit-report 2> /dev/null || echo "${ISTIO_BIN} | |||
ISTIO_SERVE_DOMAIN ?= localhost | |||
export ISTIO_SERVE_DOMAIN | |||
|
|||
# Determine the baseURL for the site depending on the context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went back and forward on deciding if I should suggest you reuse ISTIO_SERVE_DOMAIN here. Probably not, because the below would then override people who are trying to set the domain for running make serve
.
(Then I went back to this comment and changed to the suggestion below)
(Then I redid it all a third time)
I've also tried to figure out how we can get /latest
into the site config for baseURL
. When you run hugo serve
(not make serve
) it doesn't use /latest/
in the URL; you have to specify that yourself. (I get bitten by this a lot because I run a local hugo
, not the containerised version that comes with make serve
.)
Right now I don't think it can be done, because the baseURL that you set in hugo.toml is for the production
environment, but the development
environment (as used by hugo serve
) doesn't obey that value. I'll open an issue on the Hugo issue tracker for that.
Instead, I'm going to change the variable name to match the format used in the rest of the file.
deploy preview log:
|
In response to a cherrypick label: #16568 failed to apply on top of branch "release-1.26":
|
In response to a cherrypick label: new issue created for failed cherrypick: #16661 |
preliminary log:
|
Description
Related Issue:-#16559
This PR fixes incorrect baseURL values used during site generation, which were causing invalid or broken URLs in sitemap.xml.
Summary of changes
Added logic for baseURLs based on different netlify contexts.
How can we check if the baseURLs are pointing correctly?
Reviewers