GitPod doesn't load beyond the homepage
celeberr opened this issue · 4 comments
Description
I have been running Doks using Gitpod while building a project so that development isn't done locally.
Recently I wanted to add a number of docs and spun up gitpod again after a while.
The homepage on the local server loads but clicking on any link or viewing a new page fails to load.
Steps to reproduce
Clone the repo using Gitpod open in VS code and try to view any page other than the homepage.
Expected result
I should see my pages
Actual result
### EnvironmentPaste the information here as shown by npm run info
Not sure what's wrong with your settings (it works allright with a clean install).
Do you have set in config/_default/hugo.toml
:
baseurl = "http://localhost/"
And, in config/production/hugo.toml
:
baseurl = "/" # Or, your production URL
Does your .gitpod.yml
look like:
# Source: https://github.com/gitpod-io/template-hugo/blob/main/.gitpod.yml
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
tasks:
- name: Run start up tasks
before: brew install hugo
init: pnpm install
command: hugo server --baseURL $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 --disableFastRender --noHTTPCache --navigateToChanged
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
ports:
- port: 1313
onOpen: open-preview
I noticed that in your screenshots localhost is shown over HTTP — this should be HTTPS
Thanks for getting back to me.
set in config/_default/hugo.toml:
I had baseurl = My Production URL
I have changed it to baseurl = "http://localhost/
"
And, in config/production/hugo.toml:
I have my production URL
My gitpod.yml
looks identical:
# Source: https://github.com/gitpod-io/template-hugo/blob/main/.gitpod.yml
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
tasks:
- name: Run start up tasks
before: brew install hugo
init: pnpm install
command: hugo server --baseURL $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 --disableFastRender --noHTTPCache --navigateToChanged
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
ports:
- port: 1313
onOpen: open-preview
How would I change it to HTTPS?
Note there is still no change.
I have also tried cloning a fresh gitpod and get the same issue.
I'm using VS Code Version Info:
Version: 1.91.1 (Universal) Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:07:54.982Z (3 wks ago) Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.6.0
What if you first clean the Hugo output files:
rm -rf public resources .hugo_build.lock
Then, start Hugo server:
hugo server --baseURL $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 --disableFastRender --noHTTPCache --navigateToChanged
Does the default work for you: https://new.gethyas.com/doks?on=gitpod
If it works, you could compare the settings with the ones from your setup.
BTW, forget the HTTPS for now, it does not look relevant to your issue.