Commit 00c0eb5
authored
Fix broken images in Cloudflare preview builds (#1244)
Moved from #1232
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.
## Tests
- [x] Local build works, image shows up correctly
- [x] PR build works, image shows up correctly1 parent 4ff4da8 commit 00c0eb5
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
0 commit comments