Issues with built urls

I am learning to use Zola and I am encountering a problem when using the static build.

Everything works fine when serving the application but when I build the application and then try to navigate the urls they do not prepend the base url.

For example I have two urls:

  • /example
  • /

The / url loads fine initially but when I activate a link to navigate to (or fetch from) the /example url I get a 404. The same occurs when I activate a link back to /.

This happens because the base url is not prepended to any of my links inside the application.

Where I expect to get I instead get

And on local build I get C:/example instead of C:/path_to_directory/example.

I am using the base_url in config.toml as the url I am deploying to -

Does anyone have any ideas?


I think the solution is to use get_url(path='@')