Fix broken images in Cloudflare preview builds#1244
Merged
Conversation
Deploying docs with
|
| Latest commit: |
a375faa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5e73d6ce.docodile.pages.dev |
| Branch Preview URL: | https://fix-images-in-pr-preview.docodile.pages.dev |
| @@ -1,4 +1,4 @@ | |||
| baseURL: https://docs.wandb.ai | |||
| baseURL: / | |||
Contributor
There was a problem hiding this comment.
When running locally, this makes it so that the link provided in the terminal when doing hugo serve does not work, as it removes the https:// protocol from the string. Must we do it this way?
Contributor
Author
There was a problem hiding this comment.
No, I can work around this. Thanks for noticing it. I'll ping you when it's ready for another look.
This change updates production.sh to call hugo differently in Cloudflare environments than otherwise. - In Cloudflare, the variable $CF_PAGES_URL tracks the base URL of a PR build or the production deploy and needs to be part of the hugo command. - Locally, this variable is not set so don't try to use it. To help with debugging, log the environment we are building in.
c8defcd to
cffed63
Compare
Contributor
|
Images automagically compressed by Calibre's image-actions ✨ Compression reduced images by 15%, saving 7.62 KB.
439 images did not require optimisation. |
ngrayluna
approved these changes
Apr 18, 2025
Contributor
ngrayluna
left a comment
There was a problem hiding this comment.
Approved. Don't forget to remove rocket image first!
a375faa to
25f86af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moved from #1232
This change updates production.sh to call hugo
differently in Cloudflare environments than otherwise.
base URL of a PR build or the production deploy and needs
to be part of the hugo command.
To help with debugging, log the environment we are building in.
Tests