Code Monkey home page Code Monkey logo

Comments (4)

h-enk avatar h-enk commented on August 16, 2024

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

from doks.

h-enk avatar h-enk commented on August 16, 2024

I noticed that in your screenshots localhost is shown over HTTP — this should be HTTPS

from doks.

celeberr avatar celeberr commented on August 16, 2024

@h-enk

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

from doks.

h-enk avatar h-enk commented on August 16, 2024

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.

from doks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.