.css & .js not available

Hi there,
I created all my hugo config & files in a a container/pod. I’m using a theme so npm install. I got index.html, .css & .js generated in public directory. I port-forward my k8s svc & my website is accessible. But when I go to my domain .css & .js is not accessible(404).
I have added baseurl in hugo.yaml file - This doesnt work.
But when I tried to run - "hugo server --bind 0.0.0.0 --appendPort false --baseURL https://<my-domain.com>/ " - hugo is serving at https://<my-domain.com>:1313/. How can I map the url correctly

Your question is unclear. If you want to exclude the port do this…

--appendPort=false

…not this:

--appendPort false

It also sounds like you might be trying to use Hugo’s development server as a production server. If true, use something else (e.g., Apache, NGINX).

You mean use Apache as base image & add hugo & config on it?

You use Hugo to generate your site, plain html, js and css files. By default Hugo puts the files in to the “public” directory.

These files can then be uploaded to and served with a web server like Apache, Nginx etc.

The production server do not need to have Hugo installed.

See Hosting and deployment | Hugo

1 Like