apvarun / digital-garden-hugo-theme

Build your own personal Digital Garden effortlessly with this Hugo theme
https://digital-garden-hugo-theme.vercel.app/
MIT License
243 stars 77 forks source link

Deploy with --bind=0.0.0.0 #24

Open KeremKaratas opened 1 year ago

KeremKaratas commented 1 year ago

I'm trying to deploy locally within a closed domain network and having some trouble locating main.css. Network inspection shows the request to http://localhost:1313/css/main.css. I am able to reach the right main.css via http://ot-dev.senstar-stellar.local/css/main.css.

Everything works as expected on the local device.

actions taken:

  1. package.json line 9 changed to; "dev": "hugo serve --bind=0.0.0.0",
  2. config.toml line 1 changed to; baseURL = 'http://ot-dev.senstar-stellar.local' url accessable from another device on network
apvarun commented 1 year ago

Does the page load when you access via network on http://ot-dev.senstar-stellar.local?

In Hugo, when you set the base URL, all the paths for html/css/js files are built with the baseURL prefix, and so, it won't be accessible from localhost:1313

KeremKaratas commented 1 year ago

page loads when I access http://ot-dev.senstar-stellar.local except main.css because it is trying to be called from http://localhost:1313/css/main.css. So I see the page without any styling.

apvarun commented 1 year ago

@KeremKaratas Can you explain how the .local domain is set up? Is it a proxy or redirect at router level or something else?