I am using the Coder theme and when I do it all the links in the page are linking to http://localhost:4805/
This is what it is set to: baseURL = 'https://pnode3.danbot.host:4805/'
So what’s the problem?
I set baseURL = 'https://pnode3.danbot.host:4805/'
in the config and the website has the urls having the http://localhost:4805
domain. How do I fix this?
I don’t know what that means. When I do this:
baseURL = 'https://pnode3.danbot.host:4805/'
Then start hugo server I see this:
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
What?
I do not understand the problem. Perhaps you should provide an example.
See Requesting Help.
Let us see your code
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
I do see
Web Server is available at http://localhost:4805/ (bind address 0.0.0.0)
Are you running in a container? Are you using command line flags? Are you running this using someone’s npm scripts?
Again, an example of everything would be helpful. Guessing isn’t a great use of your time, or mine.
The problem I am having is http://localhost:4805
should be https://pnode3.danbot.host:4805/
in the webpages urls
I am running hugo server --bind 0.0.0.0 --port 4805
It will be when you build your site with the hugo
command.
Running hugo server
uses http://localhost:1313/
as the base URL so you can serve the site locally.
How do I set a custom port with hugo
command?
You can set a custom port when running hugo server
by running hugo server --help
and looking at the help.
But you just said to run hugo
not hugo server
If you want to build your site with a port in the base URL, add a port to the baseURL, as you have done, then serve your site with a production server that’s listening on that port.
I think there’s a major conceptual disconnect here.
How do I host the site on 0.0.0.0:4805
but have the website urls link to my website?
Locally or on a remote production server?
NVM I figured it out
hugo server --bind 0.0.0.0 --port $port --baseURL $url