Changed to local wifi address but links still pointing to 127.0.0.1:port

tldr Zola serve is linking to 127.0.0.1:1234 instead of 10.0.0.1:1234.

I don’t know whether this problem sits within Zola or the theme Karzok. My local machine is on 10.0.0.152 and by typing
zola serve -i 10.0.0.152 -p 1234 and zola serve -i 0.0.0.0 -p 1234
I can access the page from my mobile as specified here Zola-cli-usage-serve.
However, this loads the main page but without any theme. After inspecting the page, I see that all the links are set to 127.0.0.1:1234 instead of 10.0.0.152:1234.
This works on the local machine but not on any other machine.
Any suggestion where I should start looking where to fix this?
I did set base_url = "http://10.0.0.152" and then did zola build before running zola serve.
It looks like the $base_url value is wrong. How can I test this? It would be good if I could output this variable to html somehow, not sure how to do this atm though.

I’m going to try forking Zola then I can step through the code and see what’s going on.

It was worth a try, but it looks like I can’t debug the Zola code, it looks like it’s compiled to assembly and not breaking on the obvious breakpoints that I am setting. Though I could try print debugging, if I must :slight_smile:

The base_url in the config.toml gets overwritten by zola serve.
try zola serve -u 10.0.0.152 -i 10.0.0.152 -p 1234

This worked! Thanks for that. @keats !!

In the meantime, I also worked out how to serve my website using apache server as well. Which was not too difficult, it might be worth adding something for apache server to the deployment section.

Cheers!

FYI, this was actually convenient as I managed to get Apache server working with my Zola website before I implemented your fix and also learned how to use static-web-server as well.